Highlighted
Absent Member.. Absent Member..
Absent Member..
272 views

Need header files and import libs for external DLL

Jump to solution

We've got a number of scripts with common funcitons.  I'm trying to write an external DLL to contain implementations of all those functions, so we don't have to have duplicated code in each script.  So far, its been going fairly well.  However, I have run into a LR function that I need to call from my DLL, and I can't find a header for it, lr_xml_insert.  I've searched through the header files in <vugen install dir>\include, and not found it.

 

Can someone tell me where I'd find it?  Also, is there someplace where the header files for each function is listed?  I didn't see it in the help for the function.

 

As a workaround for this, I created a prototype for the function, based on the docs.  Of course, it's not in the lrun50.lib, so I get an unresolved external when I build.  Documentation on the import lib for a function would also be helpful

 

Thanks!

 

Marc Robertson

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.

Hi,

 

It is not defined in any header file, indeed. In order to call it, you can load the LrXml.dll (from LR\bin), and then call the function through GetProcAddress.

LR R&D

View solution in original post

0 Likes
6 Replies
Highlighted
Absent Member.
Absent Member.

Hi,

 

It is not defined in any header file, indeed. In order to call it, you can load the LrXml.dll (from LR\bin), and then call the function through GetProcAddress.

LR R&D

View solution in original post

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Thanks, that works for that function.  Is there someplace where I can find the dll or lib for all other functions?  

0 Likes
Highlighted
Absent Member.
Absent Member.

Unfortunately not. Every protocol uses its own set of dlls and functions. In order to look up the specific function, you can:

1) create a sample script with the function

2) insert a breakpoint at the function

3) replay the script up to the breakpoint

4) open the ProcessExplorer and lookup the dlls loaded inside HP.UTT.StandaloneDebugger

LR R&D
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

I can make that work.  However, that seems like a huge hole in your documentation.  The users guide specifically talks about writing script in Visual Studio, but to find the location of dll's needed, I need to basically hack around in your dll's.

 

If this was a third party libary I was considering purchasing, I'd drop it at this point.

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

One more bit of info needed, I think.  What calling convention do your functions use? __cdecl?  __stdcall?

0 Likes
Highlighted
Absent Member.
Absent Member.

Hi,

 

Usually it is cdecl . I am not sure whether you need it at all. It is used in order to link with the function libraries. If you will call GetProcAddress, no linking is done.

LR R&D
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.