Hello All,
i'm following this link:
http://brucearmstrong.sys-con.com/node/1668463/mobile
we have the component deploy and the regasm returns the following entries
[HKEY_CLASSES_ROOT\PowerB.PowerB]
@="PowerB.PowerB"
[HKEY_CLASSES_ROOT\PowerB.PowerB\CLSID]
@="{02634B32-F2C0-3F73-A1DE-FC65A01F93C0}"
[HKEY_CLASSES_ROOT\CLSID\{02634B32-F2C0-3F73-A1DE-FC65A01F93C0}]
@="PowerB.PowerB"
[HKEY_CLASSES_ROOT\CLSID\{02634B32-F2C0-3F73-A1DE-FC65A01F93C0}\InprocServer32]
@="mscoree.dll"
"ThreadingModel"="Both"
"Class"="PowerB.PowerB"
"Assembly"="PowerB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
"RuntimeVersion"="v4.0.30319"
[HKEY_CLASSES_ROOT\CLSID\{02634B32-F2C0-3F73-A1DE-FC65A01F93C0}\InprocServer32\1.0.0.0]
"Class"="PowerB.PowerB"
"Assembly"="PowerB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
"RuntimeVersion"="v4.0.30319"
[HKEY_CLASSES_ROOT\CLSID\{02634B32-F2C0-3F73-A1DE-FC65A01F93C0}\ProgId]
@="PowerB.PowerB"
[HKEY_CLASSES_ROOT\CLSID\{02634B32-F2C0-3F73-A1DE-FC65A01F93C0}\Implemented Categories\{62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}]
I added the following to the .reg file
[HKEY_CLASSES_ROOT\Wow6432Node\PowerB.PowerB]
@="PowerB.PowerB"
[HKEY_CLASSES_ROOT\Wow6432Node\PowerB.PowerB\CLSID]
@="{02634B32-F2C0-3F73-A1DE-FC65A01F93C0}"
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{02634B32-F2C0-3F73-A1DE-FC65A01F93C0}]
@="PowerB.PowerB"
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{02634B32-F2C0-3F73-A1DE-FC65A01F93C0}\InprocServer32]
@="mscoree.dll"
"ThreadingModel"="Both"
"Class"="PowerB.PowerB"
"Assembly"="PowerB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
"RuntimeVersion"="v4.0.30319"
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{02634B32-F2C0-3F73-A1DE-FC65A01F93C0}\InprocServer32\1.0.0.0]
"Class"="PowerB.PowerB"
"Assembly"="PowerB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
"RuntimeVersion"="v4.0.30319"
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{02634B32-F2C0-3F73-A1DE-FC65A01F93C0}\ProgId]
@="PowerB.PowerB"
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{02634B32-F2C0-3F73-A1DE-FC65A01F93C0}\Implemented Categories\{62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}]
This is my pbcode
integer li_rc
oleobject cyberark
cyberark = CREATE oleobject
li_rc = cyberark.ConnectToNewObject("PowerB.PowerB")
messagebox("RET",li_rc)
and it return -3
In the object browser i can not see the PowerB com object
Any thing i am doing wrong?
Thanks
i was following your document with the REGASM option
I will search for the GAC example
Unless you are going to use a manifest file, you have to use REGASM to create the COM registry entries. What I was referring to was using the CODEBASE potion with REGASM so that you don't have to load the assembly into the GAC.
If you want to go the GAC approach you can look at the last few paragraphs of this article http://pbdj.sys-con.com/node/2133766?page=0,1
What I would really recommend looking at though is my presentation from Elevate 2018 on "Elevate 2018 - Cross-IDE CSharp Development with PB 2018 Net Assemblies". There's new stuff in there, including information on the Brutal Developer .Net Assembly Strong Name Signer and using PowerShell to do the load into the GAC.
https://www.appeon.com/developers/library/videos/cross-ide-c-development-pb-2018-net-assemblies.html