Information générale
Catégorie:
Fonctions Windows API
>I tried your simple example, and it works in FoxPro. I have two more questions. First of all in Windows 95, I can do a Quick View on DLLs to see the export table, such as, Kernal32.dll.
I never used the Quick view for a DLL. Thanks for the tip! Although, it seems it doesn't work too well. Or: it doesn't show the export table for all dlls. I have no idea why. BTW, it fails also for ADVAPI32.DLL which is part of WIN32 API!
I use the DUMPBIN.EXE program (you must have it in the Bin directory of VC++) to see what's inside of a DLL. It doesn't have a cute Windows interface but it never failed me!
> When I created the DLL from your sample code, I did not see an export table in the DLL using Quick View. Why is that? The other question is what if I have a C++ (instead of C) program, and I want to make a DLL out of it to call from FoxPro. Is it possible? If so, how?
I never tried to write a C++ DLL without MFC. So, I don't know what you must do, etc. The rule of thumb is to use the .C extension if your program is in C and .CPP if it's in C++ (the compilation depends on the file's extension). I told you about the problem with the extension ony because, by default, VC++ saves source files with the extension CPP and it might take you a lot of time (lost :)) if you don't see it.
I'll try a C++ DLL these days (if I'll have time) and I'll tell you what I found out. In the same time, please let me know if you find something interesting. :)
BTW, don't try to return a floating point value from a DLL in VFP. It doesn't work (it truncates the value). A feature, probably. :)
Vlad
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement