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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checnk locked VFP record Under VB

Status
Not open for further replies.

andreateh

Programmer
Jul 19, 2003
83
0
0
SG
Is it possible to find out a record is lock by rlock()in VFP From VB.

My colleague is try to write an VB apllication to share table with my current VFP program. but he can't determine the record is it rlock by the vfp. Can some body give some comment ?
 
andreateh

Since the answer you are looking for is for VB, you might get a better answer in the VB forum.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Why not provide him a VFP COM .DLL to check this for him?

Rick
 
hi rick can u give me some further detail explain on :
Why not provide him a VFP COM .DLL to check this for him?
 
You could create a VFP COM .DLL that exposes whatever methods and properties you wish - custom or "passthrough" from VFP. You just have to establish what functionality you want to provide.

VB can easily use a COM component, and you don't have to worry about API calls.

A Very simple example is to create a project ComDll with just the following .PRG in it. Then compile it as a Single Threaded COM server.
Code:
* maincomdll

define class junk as custom olepublic

procedure sayhi
   Return "Hello World"
endproc
enddefine
Then create a program to call it. e.g. in VFP it would be as follows, but it wouldn't be much different in VB.
Code:
* instanstiate with comdll.junk in commdll.dll
* e.g.
ox = createobject("comdll.junk")
?ox.sayhi()
You can extend this to add more methods and add properties that can be set/checked by the COM server or the caller!

Rick

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top