|
Yea, there is both.
The LiteZip.dll I placed in the windows\system32 folder while the LIB file I placed in the LIB folder under VC8.
Obviously there more I need to do.
So I need to write the code in to tell that the DLL is there and where it is ?
Pete
|
|
|
|
|
Fritzables wrote: The LiteZip.dll I placed in the windows\system32 folder while the LIB file I placed in the LIB folder under VC8.
Generally you want to keep 3rd-party dlls in the same folder as your app unless the vendor
explicitly states to move it to a system folder. This helps prevent versioning clashes with
other applications.
The lib file can stay where it was (for the same reason I suppose).
This is from VS 2003 so may be a bit different on 2005...
In solution explorer - right click your project and select Properties.
Go to the Linker/Input section and add the libfile pathname to the Additional Dependencies line.
For example "C:\LiteZip\Lib\LiteZip.lib". Substitute the actual path and file name as usual.
If there's multiple lib files on the line then separate them with a space.
Should link!
Mark
|
|
|
|
|
That's it Mark,
Now it compiles and end up with an EXE.
Where did you learn all this ?? Just reading out of books or have ya done some courses ?
Pete
|
|
|
|
|
Fritzables wrote: Where did you learn all this ?? Just reading out of books or have ya done some courses ?
Lots of books (measured in pounds/Kgs I guess) and I started PC programming before there was
Windows Man, I'm old. I don't miss command-line compiling/linking/building one bit!
I'm still always learning though - that's why it's handy hanging out here.
Cheers!
Mark
|
|
|
|
|
Fritzables wrote: Where did you learn all this ?? Just reading out of books or have ya done some courses ?
you can add libaray file just like adding c++ file~!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
|
Mark Salsbery wrote: In my defense, some of these projects started before
Visual C++.
he he he
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Any reason you did not suggest using a #pragma?
#pragma comment(lib, "LiteZip") It's a lot easier, and if the #pragma line is placed in the LiteZip.h header file it is something that one never has to remember to do when using the library.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
PJ Arends wrote: Any reason you did not suggest using a #pragma?
I left that for you to suggest! I suggest you suggest it to the OP
Thanks for the tip!
Mark
|
|
|
|
|
Fritzables wrote: So what does the 'L' basically do ?
You too can achieve 'legend' status by reading here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks Dave,
I have come across from using Borland's Delphi, so it's difficult coming to terms with some of the coding.
Fritzables.
|
|
|
|
|
|
This is a simple VC6 question:
Build > Start Debug > Attach to Process
My problem is, no process is shown on the Attach to Process dialog - I am using account with membership in both Administrator+Debugger Users. Thanks.
Norman Fung
|
|
|
|
|
|
hi for all
i need to write code in vc++,
this code uses word and pdf formats to convert word files
into pdf files.
and i need help in getting start with my job.
can any one help me to find the format of required files.
and thanks for all
with peace,live is good
|
|
|
|
|
a_yosef wrote: i need to write code in vc++,
this code uses word and pdf formats to convert word files
into pdf files.
Good luck! Even Word can't do that. PDFs are Adobe Acrobat files.
This may help get you started...
Adobe Acrobat SDK[^]
|
|
|
|
|
hello,
is it possible to create many different threads with one thread function by passing function pointer as lparam and calling it in thread?
i am trying to do something but... not successful
what i am doing wrong?
thank you for help in advance
DWORD CALLBACK mhThread(LPVOID lpParam)
{
(*lpParam)();
return 0;
}
void fff()
{
MessageBox(0,"ehlo","helo",0);
}
Screenshots::Screenshots()
{
hookHD = CreateThread(0, 0, mhThread, (*fff), 0, 0);
}
|
|
|
|
|
I think if you are going to use windows in your threads then each thread is going to have
to process window messages.
I'm not sure if I'm scared or curious to try the code you posted!
|
|
|
|
|
typedef void (*fffptr)(void);<br />
DWORD CALLBACK mhThread(LPVOID lpParam)<br />
{<br />
try{<br />
fffptr* function = static_cast<fffptr*>(lpParam);<br />
*function();<br />
}<br />
catch (std::bad_cast&)<br />
{<br />
}<br />
}
just something like that ( code might me invallid didnt test it or what... )
|
|
|
|
|
What Environment are you working in. CreateThread is essentially an SDK function. It can only be called as part of an environment you create first. The only sensible reason to call this function would be if you want to do something very smart that surpasses the capabilities of MFC, but it would require setting up accordingly. If you do not understand this requirement, the chances are that you do not need the options on offer there, and straight MFC would be your best option.
If you are working in MFC, you should rarely use 'CreateThread at all, if you do it could realy upset things, unless if you fully understand how it interracts with MFC. Instead you use:
AfxBeginThread(pFun,lpParam);
This starts a thread with pFun(lpParam);
It also has all the 'uglies' hidden inside the MFC Library.
Believe Me it is a lot easier to handle!
LateNightsInNewry
|
|
|
|
|
actually (*lpParam) is just a void pointer.. you have to define some Function Pointer to it to call it the required function!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Here I found very simple way of doing this:
void fff()
{
MessageBox(0,"ehlo","helo",0);
}
DWORD CALLBACK mhThread(LPVOID lpParam)
{
((void(*)(void)) lpParam)();
return 0;
}
CreateThread(0, 0, mhThread, fff, 0, 0);
but... can somebody explain what does this mean: ((void(*)(void)) lpParam)(); ? it looks confusing...
and thank you again for replies
|
|
|
|
|
Simply a cast to a function pointer, the function returning no value and accepting no args. Maybe this clearify a bit the code:
typedef void (*LPFUNC)(void);
void mhThread(void * lpParam)
{
LPFUNC lpFunc = (LPFUNC) lpParam;
(*lpFunc)();
}
|
|
|
|
|
Someone in their article instructed users to "remove all post processing call to upx...". What does that mean and how do I do that?
Thanks,
BP
|
|
|
|
|
that could mean the Post-Build Step in Project Settings.
|
|
|
|