Olivier Muhring

Olivier Muhring

  • 1.8k
  • 147
  • 3k

Attempting to access a 32 bit sdk through com on 64 bit

Oct 24 2019 7:56 AM
Within the context of an application I'm developing data exporting functionality. This functionality takes data from the application and attempts to transfer it into another application.
This other application allows data-exchange trough a 32-bit com interface. Now my application get builds both in 32 bit and in 64 bit. In case of 32 bit there are no problems, when I build it in 64-bit however...
I've done some research on the subject and I found a solution on https://techtalk.gfi.com/32bit-object-64bit-environment/.
I tried this and it appeared to work.. up until a point...
  1. connnection = new ClSdk.Venice();  
  2.   
  3. bsCreatedForVenVer = "11.50_";  
  4. bsAppName = "MyApplication";  
  5. eLanguage = eLanguage.lngNld;  
  6. bWithUserInterface = true;  
  7. bsInitials = "XXX";  
  8. bsName = "Yzzzzzzzzzzzz";  
  9. bsPassword = "Yzzzzzzzzzzzz";  
  10. bsFunction = "Uvvvvvvv Wxxxxxxx";  
  11. bsCabinet = "Abbbb";  
  12. bsDossier = "Some Client";  
  13.   
  14. accessMode = connnection.GetAccessMode();  
  15. if (accessMode == eAccessMode.amSecure)  
  16. {  
  17.     connnection.LogonSecure(bsCreatedForVenVer, bsAppName, eLanguage,   
  18.  bWithUserInterface, bsName, bsPassword);  
  19. }  
  20. else  
  21. {  
  22.     connnection.Logon(bsCreatedForVenVer, bsAppName, eLanguage, bWithUserInterface, bsInitials, bsName, bsFunction);  
  23. }  
When I started I would get an exception the second I tried creating new instance of the ClSdk.Venice class. After following the steps I found on the post the creation of the instance worked flawlessly, but when coming to to the connection part (connnection.LogonSecure) a new exception was thrown:  'errNoInterfaceAsService:
No interface allowed if running as a service.'
 
 
 
I've been trying to find some more information on this exception, but so far my searches didn't turn up anything useful.
Does anyone here has an idea how to resolve this?

Answers (4)