【发布时间】:2016-01-17 18:14:01
【问题描述】:
我根据Creating COM using ATL in C++ from VS2012 中的描述使用ATL 创建了简单的COM 对象,并使用regsvr32.exe 在系统中注册。但我不确定它是否已准备好用于 PHP 等脚本语言。我正在尝试使用取自 script location 的 Power Shel 脚本查找我的对象
function Get-ComObject {
param(
[Parameter(Mandatory=$true,
ParameterSetName='FilterByName')]
[string]$Filter,
[Parameter(Mandatory=$true,
ParameterSetName='ListAllComObjects')]
[switch]$ListAll
)
$ListofObjects = Get-ChildItem HKLM:\Software\Classes -ErrorAction SilentlyContinue | Where-Object {
$_.PSChildName -match '^\w+\.\w+$' -and (Test-Path -Path "$($_.PSPath)\CLSID")
} | Select-Object -ExpandProperty PSChildName
if ($Filter) {
$ListofObjects | Where-Object {$_ -like $Filter}
} else {
$ListofObjects
}
}
我找不到我的 ATLProject1.SomeObject 类。我的项目中缺少什么?
【问题讨论】:
标签: php c++ visual-studio-2012 com