Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can anyone convert this to a Foxpro Dll
Message
From
28/06/2010 01:03:36
 
 
To
25/06/2010 08:21:36
General information
Forum:
Visual FoxPro
Category:
Web Services
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01470546
Message ID:
01470762
Views:
80
>Hi,
>
>We have a number of customers using a Foxpro webservice for there webshops.
>Once an d a while, we have to update a certain dll (new functionality added etc.)
>To that end, we created another separate webservice who's job it is to download a specified dll and replace it
>in the webservice-directtory.
>That's when we get confronted with dll's which are in use due to a running process.
>
>I'd like to terminate that process, and found to that extent a marvellous piece of code in C.
>unfortunately, this code is to be compiled as EXE only.
>Usage from command line would sound like : Freelib NameOfDll.dll
>
>So here goes, can anyone compile this code in a DLL which we can use from within Foxpro?
>
>Code is from Dalibor Drzik and can be found here : http://www.codeproject.com/KB/threads/freelib.aspx
>
>Thank you so much
>
>Guillaume Engelen
>

All that is not needed. The way to do it is to have a calling PRG that is compiled into the DLL. Then you have your main code in a separate prg.

For example I have 2 files

ChangeDetails.Prg
This is the calling code that is actually compiled into the DLL and will be locked by the IIS process.
Function ChangeDetails(oParameter as Object)

		* Set procedure to X version prg
		Set Procedure To ChangeDetailsx.prg Additive

		* Call x version
		ChangeDetailsx(oRequest, This)  && pass in the object received or any other parameters

		* Release procedures
		Set Procedure To
		Clear Program ChangeDetailsx.prg
		
		* Return
		Return 

	Endfunc
ChangeDetailsx.prg

This is the code that would normally go into the ChangeDetails() Function

The naming convention helps for maintenance.

This way the ChangeDetails PRG with its function will be compiled and will be locked in memory by IIS but since it never changes, it does not matter. You can open the ChangeDetailsX.PRG and update it and it will not be locked for much of the time.

HTH

Bernard
Previous
Reply
Map
View

Click here to load this message in the networking platform