IPC called from Acrobat Reader in Citrix fails

c++ / delphi package - dll injection and api hooking
Post Reply
michel
Posts: 24
Joined: Tue Aug 10, 2010 4:20 pm
Location: Paris France

IPC called from Acrobat Reader in Citrix fails

Post by michel »

I have an Acrobat Reader plug-in communicating with a Broker user process using SendIpcMessage().
All runs fine in XP, Vista, Win7 on 'normal' computers.
But, when XP runs in Citrix, SendIpcMessage() fails.
REM: in Citirx the Broker runs and has successfully started the IPC queue used by the plug-in.
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: IPC called from Acrobat Reader in Citrix fails

Post by madshi »

Just a quick question to start: Did you call InitializeMadCHook() in both the Broker process and the plugin-in before using the IPC functions? (This is needed only if you use MSVC++, it's not needed when using Delphi.)

Are Acrobat Reader and Broker user process running in the same session and under the same user account?
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: IPC called from Acrobat Reader in Citrix fails

Post by madshi »

P.S: You could try doing the following call in both the user process and the plug-in, before using the IPC functions:

SetMadCHookOption(USE_NEW_IPC_LOGIC, NULL);

In XP this call will tell madCodeHook to use the same IPC core logic that is used for Vista and Windows 7. I had introduced a new IPC logic for Vista and win7, but I'm still using the "old" logic in XP by default.
michel
Posts: 24
Joined: Tue Aug 10, 2010 4:20 pm
Location: Paris France

Re: IPC called from Acrobat Reader in Citrix fails

Post by michel »

Thanks. Sorry for my late answer.
Each of my applications using your library (injected hook, manager service, broker and Acrobat plug-in) call InitializeMadCHook() in their initialisation code but the never call SetMadCHookOption().
The IPCs run fine in XP, Vista and Windows 7 but they fail on one of our client configuration running XP on Citrix.
I'll send a test version with SetMadCHookOption() and I'll let you know their answer.

I also note that when SendIpcMessage() fails, there is no system error explaining why. For example if I send a message to an inexisting queue, the function reurns FALSE but GetLastError return 0 (no error).
michel
Posts: 24
Joined: Tue Aug 10, 2010 4:20 pm
Location: Paris France

Re: IPC called from Acrobat Reader in Citrix fails

Post by michel »

I forget:
The Broker and the plug-in run in the same user session with the same credentials (the Broker is a user program with automatic startup). The communication queue name is indexed with the SessionID.
Post Reply