|
I'm using Visual C++ 6.0.
Can you use a third party DLL that doesn't come with .LIB and .H? Can we regenerate .LIB and .H from the DLL?
cheers,
Jo
|
|
|
|
|
Johan_yo wrote:
Can you use a third party DLL that doesn't come with .LIB and .H?
Use LoadLibrary() and GetProcAddress() .
Johan_yo wrote:
Can we regenerate .LIB and .H from the DLL?
You cannot generate .H files. You can, however, generate the .LIB files, but I have not done this in nearly 10 years, thus the utility to do so (IMPLIB, maybe) escapes me.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
the utility is called "lib"
Don't try it, just do it!
|
|
|
|
|
Alexander M. wrote:
the utility is called "lib"
After I generate the .LIB file, how can I use the class exported from the DLL?
Don't I need a .H file so I can say #include <thedoth.h> in my CPP?
I know what the classes and their exported method are. I'm still quite new using DLL, so my Q might sound stupid.
cheers,
Jo
|
|
|
|
|
Alexander M. wrote:
the utility is called "lib"
Sorry, earlier I thought I got Lib.EXE to create the LIB file, but it actually failed (stupid me didn't look at the error message). I typed:
PathToMyVC\lib.exe myDLLPAth\myDLL.dll /DEF:C:\test
I got:
myDLLPath\myDLL.dll : fatal error LNK1136: invalid or corrupt file
What is the proper way to use LIB.exe?
cheers,
Jo
|
|
|
|
|
DavidCrow wrote:
Use LoadLibrary() and GetProcAddress().
Can I use LoadLibrary then access a class in the DLL? The DLL I want to use, exports 3 classes. How can I use the class, GetProcAddress() can be use with functions only, right?
cheers,
Jo
|
|
|
|
|
Johan_yo wrote:
Can I use LoadLibrary then access a class in the DLL?
As I've never tried this, I do not know.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi,
I'm trying to write a prgram which will continue to run (maybe invisibly on the background) and will track all user keystrokes and will write them in a log file.
Any pointers on how such a prgram can be written?
Please help
|
|
|
|
|
This is what you are looking for...
Start Here[^]
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
|
I am trying to teach myself C+. I wrote a little code in notepad and I downloaded the free borland compiler. How do I get the compiler to make the code work? I'm lost and know nothing, please help!
|
|
|
|
|
Some ideas:
1. RTFM. I mean, the compiler had to come with some sort of documentation, so check that out. Most of us here use Microsoft's compiler so I'm not sure how many of us could help you with Borland's.
2. Run the compiler on the command line and see what kind of "usage" messages you get back. It may list all the compiler options available.
3. Search the web for documentation on the compiler. The Borland site may help.
Good luck,
Alvaro
Hey! It compiles! Ship it.
|
|
|
|
|
Hi there
I would suggest you get a compiler with a graphical user
interface(gui), with icons and buttons to click.
Command line compilers can be difficult to use especially
for beginners. I'm new to programing myself and i found it
to be to huge of a mission since i am a beginner.
So i got myself Visual Studio.Net easy to use.
There are free gui compilers like Bloodshed witch you
can download.
http://www.bloodshed.net
regards bhangie
|
|
|
|
|
I have a CString vector with names of directories I got with findFTPFile() after going over to an FTPSite with GetFTPConnection. I need to show these directories like we see in windows explorer, so the user can click on the dir folder and go into it and select the file he wants to ftp back. Is there a simple way to do this?
I started looking into the CP wanderer ftp project but soon got lost.........it might be more complicated than I want anyways. But maybe this is not a simple task to do what I want?
Thanks,
ns
|
|
|
|
|
You'd need a Tree control (CTreeCtrl/CTreeView) on the left and a List control (CListCtrl/CListView) on the right. Sounds like a lot of busy work.
How about having your app invoke an FTP application such as FTP Explorer[^]. It already does what you need and it's free!
It just may be what you need to save yourself a lot of extra effort.
Regards,
Alvaro
Hey! It compiles! Ship it.
|
|
|
|
|
Thanks! Thats a good idea.
ns
|
|
|
|
|
If you want to create an explorer type interface, use Appwizard.
In step 5, select 'Windows Explorer' for the 'Style of Project'.
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
Hi all,
I have dialog based application (MFC), pressing a button on that dialog, pops up a new dialog, the focus is on the new poped up dialog, and the main dialog loses focus....
is there a trick to give the title of the non focus dialog the color and shade of a focused dialog , meaning both dialog will look as if they are both in focus?????
can any1 help me there?
thanks
Yaron
|
|
|
|
|
Ofcourse you could render that area yourself but, and trust me on this:
Since only one window will have the focus do not try to trick the user into thinking otherwise.
I personally would despise any programmer involved in such a program. Ok, that maybe a bit much but the point is: obey the rules dammit!
|
|
|
|
|
I have an API program in which I have one thread other than the main thread. In the other thread, I wrote MessageBox(globalMainWndHWND, ...) , trying to get a message under my main window. The problem is that at this step the MessageBox function does not return! I thought that Windows might prevent threads from using objects created by other threads. I tried to pass the HWND as a parameter to the thread function (instead of using the global variable), but the same problem happened again. SendMessage did the same thing. Could someone please tell me how I could solve this problem? Thank you very much.
Hosam Aly Mahmoud
|
|
|
|
|
If the secondary thread does not have its own message pump (i.e., worker thread), calling MessageBox() in it will effectively block the message pump in the primary thread.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Thanks for your reply, but could you point out an alternative?
Hosam Aly Mahmoud
|
|
|
|
|
Can I see if I can clarify the question?
At this point in the secondary thread, you want to cause a message box to be displayed, but you want your secondary thread to continue running even though there's a message box up.
To do this, you'll need to post a message to your primary thread (probably to the main window) to cause it to create the message box, using PostMessage . Unlike SendMessage , PostMessage is non-blocking - it returns immediately after adding the message to the message queue of the thread that owns the window.
SendMessage blocks the sending thread until the receiving thread responds, by either returning from the window procedure or by calling ReplyMessage (desktop only; Windows CE does not offer this function). The return value of SendMessage is the return value of the window procedure, or the value passed to ReplyMessage .
|
|
|
|
|
Thanks for your help.
I am sorry to say that your clarification missed a bit. I want to stop the secondary thread, and get out the message box. After the message box returns yes or no, the secondary thread will do work according to the user's choice. But thanks for your help anyway!
Hosam Aly Mahmoud
|
|
|
|
|
Hi,
I am trying to convert the existing project that I am working on which is in Visual C++6 to Visual C++.NET. When I installed Visual Studio.NET and tried to open the project, it put up a message box saying that the project needs to be converted to version 7. When I hit the Yes button, the whole thing crashed.
I don`t think there is anything wrong with the installation. Everything else is working fine, including all teh 3 languages (VB, C# & C++) and also, the same utility is SUCCESSFULLY converting several smaller projects into .NET.
Does anybody ahve a clue????
Thanks in advance,
(vinod)
|
|
|
|