Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lotus Organizer 97 API
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00055806
Message ID:
00055989
Views:
31
>>>I found a the Lotus Organizer 97 GS API Toolkit on the web and downloaded it. I want to retrieve calendar information for an Organizer file, but I am having difficulty initializing the API. They have examples of calling the API (orgapi32.dll) from C++ and Visual Basic. I want to do it from Visual FoxPro. Below is excerpt from the help file that comes with the Toolkit:
>>>
>>>Initializes all the components needed for Organizer API. If you leave out any of the parameters when callling this function, the API displays the standard login dialog box.
>>>
>>>hOrgAPI OrgAPIInit( hWnd,
>>> hInstance,
>>> hPrevInstance,
>>> lpfnMsgCallback,
>>> lpszContainerPath,
>>> lpszName,
>>> lpszPassword,
>>> ApiInitFlags,
>>> lpOrgAPIInitError)
>>>
>>>Here is what I did in my program:
>>>
>>>DECLARE Integer OrgAPIInit IN OrgAPI32 ;
>>> Integer hWnd, ;
>>> Integer hInstance, ;
>>> Integer hPrevInstance, ;
>>> Integer lpfnMsgCallback, ;
>>> String lpszContainerPath, ;
>>> String lpszName, ;
>>> String lpszPassword, ;
>>> Long ApiInitFlags, ;
>>> Long @lpOrgAPIInitError
>>>
>>>lnAPIInitFlags = OAIF_NOUI
>>>lnOrgAPIInitError = 0
>>>
>>>lnAPIHandle = OrgAPIInit(0, 0, 0, 0, "", "", "", lnApiInitFlags, @lnOrgAPIInitError)
>>>
>>>The above statement gives the following error:
>>>Cannot load 32-bit DLL orgapi32.dll. (Error 1753)
>>>
>>>I thought if the DLL could be called from Visual Basic, then I should be able to call it from Visual FoxPro. Is this a bad assumption? Does anyone have any ideas?
>>>
>>>Thanks!
>>
>>Theoretically, yes. Practically, no! :) I had a DLL that I could not open in VFP, although it worked in VC++.
>>
>>I don't think it will help (I don't think you can have that error message because of this), but: any parameter of type "lp..." is a pointer. So, you must declare it as passed by reference (ie with an "@") and use it in the same way. Also, you can't use callback functions in VFP (AFAIK).
>>
>>This doesn't make any difference: LONG is exactly the same as INTEGER in VFP.
>>
>>Vlad
>
>Vlad,
>
>Didn't this question come up within the past couple of months? If I recall correctly, Rick Strahl posted a message regarding DLLs that VFP can't load. I'm not sure, but I believe that it had to do with the calling convention that the DLL required, and something along the lines of it having to be FAR PASCAL. I haven't done anything serioius with C in 10 years, so if my facts are a bit off, please forgive.
>
>George

Yes, there was a thread on this subject. Although, I don't think it's the same with this problem. Or: It may be this, but I also saw a DLL that didn't want to load in VFP although it should.

More on this subject tonight, now I must go.

Vlad
Previous
Reply
Map
View

Click here to load this message in the networking platform