PDA

View Full Version : COM Security and flex initialization



yamahapacifi
01-12-2009, 02:10 PM
It appears that one of the flex publisher methods initializes DCOM security by calling CoInitializeSecurity.

The method fails if I call it after a call to lc_flexinit:

# for hex 0x80010119 / decimal -2147417831 :
RPC_E_TOO_LATE winerror.h
# Security must be initialized before any interfaces are
# marshalled or unmarshalled. It cannot be changed once
# initialized.
# 1 matches found for "0x80010119"

The call succeeds if I remove flex initialization. This is going to be a big problem for us. Why is flex breaking COM rules and calling CoInitializeSecurity inside a library? Can this functionality be modified?

Thanks in advance,
Paul

yamahapacifi
01-27-2009, 10:37 AM
It appears that lc_flexinit may be causing a DCOM marshalling event, which would cause the default security to be used anyway. If your app needs to explicitly set security it should do so before the call to flex init.