
Activex Runtime Error: 438
Hi,
I have written an activex control which accesses the windows CryptoAPI in
the DLL files AdvAPI32.dll and Crypt32.dll.
Inside my control is a custom method which I call from VBScript after
loading the control:
<script>
call mycontrol.myfunction("SomeTextString")
</script>
This function takes an LPCTSTR as an argument, computes another string and
returns a BSTR.
My control is signed using the ActiveX SDK provided test certificate, and
the code is marked as safe.
I initialise my object using the following code in my webpage:
<OBJECT ID="mycontrol1" WIDTH=100 HEIGHT=51
CLASSID="CLSID:C1AB29C0-6A27-11D4-97A2-00C04F12C42F"
CODEBASE="control.cab#version=1,0,0,0">
</OBJECT>
When I run it on my development machine, it runs exactly as I expect,
although I built it on this machine, so it goes through a process of
registration during the build. Because of this, when I use the ActiveX
control pad, I can see it as an installed control.
However, when another machine tries to run the, the error:
"object doesn't support this property or method mycontrol.myfunction" is
thrown up, and the Microsoft de{*filter*} points it to where I call my function.
I suspect that I am not registering my control properly, Here is the inf
file included in the cab file:
[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[Add.Code]
mycontrol.ocx=mycontrol.ocx
msvcrt.dll=msvcrt.dll
mfc42.dll=mfc42.dll
olepro32.dll=olepro32.dll
[mycontrol.ocx]
file-win32-x86=thiscab
clsid={C1AB29C0-6A27-11D4-97A2-00C04F12C42F}
FileVersion=1,0,0,1
RegisterServer=yes
[msvcrt.dll]
FileVersion=4,20,0,6164
hook=mfc42installer
[mfc42.dll]
FileVersion=4,2,0,6256
hook=mfc42installer
[olepro32.dll]
FileVersion=4,2,0,6068
hook=mfc42installer
[mfc42installer]
file-win32-x86= http://www.*-*-*.com/
run=%EXTRACT_DIR%\mfc42.exe
Has Anyone got any suggestions as to how I might complete the registration
process on a remote PC that hasn't built my control.
Best Regards,
Kevin