Hi donna,
First of all I am not a VB programmer hence no expert how VB does stuff.(I had a hard time getting software to do VB6)However your code threw errors and my debugger said it is doing access violation on llkernel.dll.I could see in my Builder that even though errors happened ,the second iteration and so clearly livelink sideOf things were not at fault.
The documnentation LL_Uninitialize
This function must be executed after all LAPI processing is complete. No other LAPI functions should be called after this function.
The subsequent clicks of the button is actually violating this rule.So I commented this statement of your code 'status = LL_Uninitialize() and lo and behold I could click away any number of times.
This I reckon should be called only when the form self destructs(I am sure you will find some method called form_unload or something of that nature)If you are happy with this explanation and work around see if it helps.Howver if it is a qn of memory management and OOP hype I am not trained to answer those kinds.LAPI now support VB.NET in its true OOP form where the memory management is handled like in java or C# so that could be another thought too.
-----Original Message-----From: eLink Discussion: LAPI Discussion [mailto:lapi@elinkkc.opentext.com] Sent: Tuesday, December 19, 2006 12:34 PMTo: eLink RecipientSubject: VB6 LAPI Memory Issue
VB6 LAPI Memory IssuePosted by Nalls, Donna on 12/19/2006 01:32 PM
Hi All,
I have set aside my beloved OScript and am having a go at my first VB6 LAPI application. ;o) ;o(
I have a command button which builds a TreeView for selecting a folder from the LL Enterprise Workspace. The treeview loads perfectly fine the first time. yippee! However, if click on the command button again (or click on an expand icon), then i am getting an "unable to read referenced memory" error.....
I have done a bit of debugging and it seems to be happening on the call to LL_ListObjects() and seems to have something to do with the VolId.
If I may trouble someone to have a look at the attached and tell me what in the world i am doing wrong, i would greatly appreciated it!!! Or, please tell me that i don't have to build a treeview and there is some other way of developing this thing...
Best,Donna
[To reply to this thread, use your normal E-mail reply function.]
============================================================
Attachment link: SelFolderCmd_Click.txthttps://knowledge.opentext.com/knowledge/llisapi.dll/open/9734999
Discussion: LAPI Discussionhttps://knowledge.opentext.com/knowledge/llisapi.dll/open/765428
Livelink Server:https://knowledge.opentext.com/knowledge/llisapi.dll
To Unsubscribe from this Discussion, send an e-mail to unsubscribe.lapi@elinkkc.opentext.com.
Anadarko Confidentiality Notice: This electronic transmission and any attached documents or otherwritings are intended only for the person or entity to which it isaddressed and may contain information that is privileged,confidential or otherwise protected from disclosure. If you havereceived this communication in error, please immediately notifysender by return e-mail and destroy the communication. Anydisclosure, copying, distribution or the taking of any actionconcerning the contents of this communication or any attachments byanyone other than the named recipient is strictly prohibited.