Prev   Next

Back to the top of the FAQ

Q. I am using the Extensibility SDK with a COM object written in Perl for authentication. However I am getting Could not AfxOleInit (2) and RPC_E_CHANGED_MODE in the event log, and I cannot get access with a valid username password.

A. The Win32 implementation of Perl is initialized to COINIT_MULTITHREADED by default. However for robustness and security, the Extensibility SDK calls the COM object on a thread that is COINIT_APARTMENTTHREADED.

If you are using Perl for other applications on the same machine, then they will initialize Perl as multithread and the above conflict will occur.

Set Perl to initialize as COINIT_APARTMENTTHREADED to solve this problem.

Note:
Perl starts out with a dispatch id of 0, which AuthentiX won't accept.
Make a dummy function and the second function will be number 1 - use that one.
You can use OleViewer to find the dispatch id of functions you create.

Another thing to try:
Set HKEY_LOCAL_MACHINE /Software /Flicks Software /AuthentiX /1.0 /AuthentiXConfig / omitoleinit to be 1 and reboot. This skips the OleInit call before calling the COM component.

Back to the top of the FAQ

Prev   Next