Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can i access a program's hooks from a VB .dll

Status
Not open for further replies.

ryan

Programmer
Nov 13, 2000
73
US
A company I'm working with is creating an application in C++ for us and has set a way for us to man-handle the program from a dll but the program is written in C++. Can we access the the programs and the hooks from a VB dll? Or is there more information I need to show?

Thanks,
Ryan
 
Ryan,

Yes generally. What do you mean by 'hooks'? There are any number of methods for inter-process communications.

Is the application a COM Server? If so then VB can work with it easily.

If they want you to insert your dll into the process and make C++ API type calls directly into the process then you could run into parameter type conflicts.

If they are using Windows Messages then again it depends on what data the parameters are supposed to contain.

-pete
 
The program is called FTP Serv-U (a usually known FTP program). I have a consultant who has built a .dll in C++ but know I want it in VB. Take a look at the help file here at: ftp://ftp.cat-soft.com/serv-u.doc under section 64 Using External User Access Verification DLLs.

Thanks,
Ryan
 
Ryan,

Page 64 contains information regarding the DLL entry point. The function takes a pointer to a structure, here is the structure definition:

struct RClientEventStr {
int Event; // event code
int Flag; // flag, meaning depends on event
char User[40]; // user name
char Aux[512]; // auxiliary area, usage depends on event
char HostIP[16]; // server IP home
unsigned long SessionID; // unique session ID
}

In old versions of VB this was simply not possible. In todays versions I don't know. Take this structure and the function signature

int HandleClientEvent(RClientEventStr* pEventStruc)

To one of the VB Forums here in Tek-Tips. I'm sure someone there can answer your question.

Good luck
-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top