[Migrated content. Thread originally posted on 26 September 2003]
I've made an ActiveX control which includes some Windows API Functions (change cursors, check LAN connection, use Run-Format dialog boxes, eject cd's, get drive letters, windows-system-temp directories, computer and user names, total-free disk space and memory etc).Control's name is "AdamApi", with a class named "Api".
I try to check if it is registered by using declaratives:
working-storage section.
77 API-HANDLE USAGE IS HANDLE OF AdamApi.
procedure division.
DECLARATIVES.
OBJECT-EXCEPTION SECTION.
USE AFTER EXCEPTION ON OBJECT.
CALL "C$SYSTEM" USING "regsvr32 -s \\bin\\AdamApi.ocx".
OBJ-DECL.
EXIT.
END DECLARATIVES.
Main-Logic.
CREATE @Api OF @AdamApi HANDLE IN API-HANDLE
DESTROY API-HANDLE
.....
The ActiveX control registered normally, but when I use it in my cobol program I get the message "Member not found". If I register it outside the program then it works fine!
If the problem is in the above code and not in my ActiveX, I'll upload it with a demo cobol program.