Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use classes from an Accpac DLL?
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01340203
Message ID:
01340719
Views:
6
>Thanks Sergey
>
>Following on from my oLink = oSession.OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE), then as per your suggestion loAccView = loAccSession.OpenView2(ViewID As String, pExtErrInfo As Variant),
>
>this now works:
>
>PRIVATE pExtErrInfo As Variant
>pExtErrInfo = ""
>
>oHeaderView = oLink.OpenView2("OE0520", @pExtErrInfo)
>
>I passed the error variable by reference, as I assume that would be required, then to test it forced an error by passing in an invalid View ID, but the program didn't pass anything back into pExtErrInfo, just an error message dialog...
>
>But, I do now have an Accpac View, that seems to be what I'm used to working with in the VB projects I've had to work with. Which is a very good sign - so thank-you very much!
>
>This is the benefit of your years of experience helping us all out, is there some way I could educate myself more on understanding the information that the object browser is presenting, so I could know what I'm looking for when trying to work with a DLL? For instance it seems reasonable, now you've explained it, that OpenView2 is the correct method to use instead trying to get an AppacView class or IAccpacView Interface, but if there was no clue in the naming of it (having the word "view" in the name) how might I otherwise have stumbled accross the correct method to use?
>
>Perhaps there is a primer out there on getting to grips with an unknown DLL, and how they need to be used in VFP vs. VB?

Hi Chris,

The best way is to find a manual for the COM object you're working with. Otherwise, you'll have to guess most of the stuff. Some of it, like 'pExtErrInfo' almost impossible to guess. Is it string, integer, pointer to something? It could be either of them or something else.

The Object Browser shows info stored in a COM object type library. If you want to understand it in full, you should learn a COM object specs.

Two methods with almost identical names (OpenView and OpenView2) was a clue. Luckily the programmer who wrote the DLL also added comment about 'scripting languages'.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform