Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use my own dll
Message
 
To
05/10/2005 08:56:21
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01056212
Message ID:
01056301
Views:
22
From either a DOS prompt or the Start->run use
regsvr32 "c:\myapp\mydll.dll"
Or from a distance check to see that it is registered with this.
eclare Integer LoadLibrary In kernel32;
    STRING lpLibFileName

Declare Integer FreeLibrary In kernel32;
    INTEGER hLibModule

?isDLLAvailable('cdosys.dll')
Function isDLLAvailable(DllFilename)
    Local hModule

    hModule = LoadLibrary(DllFilename)
    If hModule > 32 
        FreeLibrary(hModule)
        lRetval = .T.
    Else
        lRetVal = .F.
    ENDIF
    RETURN lRetVal
Endfunc
>Is that in foxpro code? Or just from the run menu? How would you do it for a client machine that is not local? Is it part of an install process?
>
>>use
>>
regsvr32 "c:\myapp\mydll.dll"
>>
>>>Now a question which must appear elemantary to some of you.
>>>But after doing FP since it came out of Toledo, I have never create a dll
>>>
>>>the following scenario:
>>>I created a simple program to create a report and email it.
>>>
>>>I built a dll in VFP9 and now I want to call it from another VFP8 application
>>>
>>>The project is called SPL, the class in it is called SendPriceLlist
>>>and takes 2 parameters: ID and emailaddress
>>>
>>>
>>>now from a completely different app I want to
>>>do something like
>>>x1 = 1234567
>>>x2= [emailaddress@xxx.com]
>>>
>>>o=NEWOBJECT([SPL.SendPriceList],x1,x2)
>>>
>>>
>>>do I have to register the dll first?? and how?
>>>
>>>thanks
Previous
Reply
Map
View

Click here to load this message in the networking platform