|
VuNic wrote: In addtion to what cedric has said,lib files are used to link the DLL implicilty.
your .h -> .lib ->.dll .
Really ? .lib and .dll are two complete different things to me. A .lib is sort of a collection of .obj, and a .dll is, well, a .dll. Completely independant. So the .lib ->.dll, I do not understand ...
~RaGE();
|
|
|
|
|
If you want to implicitely load your dll (so, include the header files to your app and not call LoadLibrary and GetProcAddress), a lib file is needed. Dll and lib files are not so different, the only difference that I know is that the lib will be added to your app during the linkage of your app, and the dll will be added at run-time.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
lib and .dll are completely different .
The .lib file is a file that has the stuff the linker needs to build your executable program. Windows cannot use them, but compilers and linkers can. Its a lot like a .obj file really, except it contains everything needed for all the stuff in your 'library' whereas an obj is from a single source file. It also contains a protocol for the associated .dll (basicaly, offsets of where functions start, the name and parameters(?) of the functions, calling conventions(?) and things like this).
A .dll can have a lot of different stuff -- data, functions, anything really. A dll that has shared routines is what the OS needs to run those routines -- compare this to a 'mini executable'. A program smoothly jumps from its own executable statements to the ones in the .dll and back again. Windows does some smoke and mirrors here to make the file loading efficient(ish).
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
please read my reply to Rage.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
Yup, he's(cedric) right. When you make use of the .lib file, you can call the function in the dll as if it's available as a location function. You don't need to go in for LoadLibrary , GetProcAddress which would otherwise become an "explicit" linking.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
Hi Cerdic and Vunic,
While working with dlls, do we need to explicitly copy the .lib file along with the dll file in to the path of the exe?
if not, how it is going to be linked in the Project->Settings->Link ?
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
NiceNaiduWhile working with dlls, do we need to explicitly copy the .lib file along with the dll file in to the path of the exe?
No, only your dll is needed in the folder of the exe once it has been compiled.
NiceNaiduif not, how it is going to be linked in the Project->Settings->Link
Yes, you have to specify that you link to this specific library in the settings of your project.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Yaa..Now i got it..Thanks Cerdic.
Hey Rage, Is it clear now ??
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Otherwise you'd get a typical Linker error .
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
NiceNaiduHey Rage, Is it clear now ??
Quite, thank you.
Here we work with microcontroller, no windows stuff. We are using libs as well, and libs are really only a collection of .obj with a header and entry points for the linker (actually we also have a locator, this is the step you do not need with .dll).
I did not know about the fact that you can simply add a .lib to get direct access to the .dll.
Thanks to Cedric and Vunic as well.
~RaGE();
|
|
|
|
|
lib is only required while linking(creating .exe) once it is linked even if u delete the lib the program will execute
never say die
|
|
|
|
|
Hi !!!
An .lib file is an static library. It can contain some .h or .cpp or .inl, ... files. It is a library, so it is no executable file. You can use it for build libraries, for example : STL, boost, ...
By !!!
-:KNOX:-
|
|
|
|
|
Hi,
On Windows Xp, there is a functionality that allows to copy the archives of an user. This functionality is had access through My Computer ( click of the right button of mouse ) -> Properties -> Advanced -> User Profiles -> Settings -> Copy to.
An example:
There is user called João. In the directory c:\documents and settings\João\ are the João user's files. I just want to copy them to another directory. This functionality, as i said, is had access by My Computer -> Properties -> Advanced -> User Profiles -> Settings -> Copy To, but i want do that by C++ programming.
I was thinking in something like a method of a WMI Class or the ShellExecute command.
I'm watting for help!!
gratiful!
Hélio
|
|
|
|
|
This does not seem to be available on my windows XP. Just found it, lost a bit of it during translation (my computer is in german).
Anyway, do you have an idea what it copies ? Is it only the directory under C:\Users ?
~RaGE();
-- modified at 10:40 Thursday 18th May, 2006
|
|
|
|
|
CString m_Username = "test";
how i use Getlenght() to find the number or letters ?
|
|
|
|
|
I think it's pretty obvious no ?
int Count = m_Username.GetLenght();
MSDN[^] are also very usefull.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
GetAt() returns the character of type TCHAR of the Given index parameter of GetAt() function
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
Ensure that whenever u r using m_string.GetAt(iSomeIndex) ,
Check this condition iSomeIndex<= m_string.GetLength();
else u will get an assertion.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Immunity18 wrote: how i use Getlenght() to find the number or letters ?
GetLength()
int nCount=m_UserName.GetLength();
GetAT()
ASSERT(m_UserName.GetAt(0)=='t')
"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
|
|
|
|
|
I guess there *is* such a thing as a stupid question...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Ah, John, you finally got your sig fixed.
~RaGE();
|
|
|
|
|
Hi,
I have problem with inserting image in the HeaderCtrl of CListCtrl..
I tried to insert a column a follows
InsertColumn( 0, "text", LVCFMT_LEFT, 100 );
soon after this statement I called the GetItem of the headerctrl as follows
HDITEM stHeaderItem = {0};
stHeaderItem.mask = HDI_IMAGE;
stHeaderItem.iImage = -1;
GetHeaderCtrl.GetItem( 0, &stHeaderItem );
Now I am getting the image index as 0.The expected result is -1( Since i haven't set any image).
Why this is happening?
nave
|
|
|
|
|
iImage parameter is the Zero-based index of an image within the image list
no matter you are setting image or not
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
By setting image I mean setting the Iimage member of the LVCOLUMN structure
nave
|
|
|
|
|
Try Using this:
<br />
CImageList *ImgHeaders = new CImageList; ImgHeaders->Create(Bitmap ID, 16, 3, RGB(255, 0, 255));<br />
HDITEM hditem;<br />
CHeaderCtrl *headerCtrl;<br />
headerCtrl = new CHeaderCtrl();<br />
headerCtrl = m_pScanList.GetHeaderCtrl();<br />
headerCtrl->SetImageList(ImgHeaders);<br />
<br />
<br />
for (int i = 0; i < headerCtrl->GetItemCount(); i++)<br />
{<br />
hditem.mask = HDI_IMAGE | HDI_FORMAT;<br />
headerCtrl->GetItem(i, &hditem);<br />
hditem.fmt |= HDF_IMAGE;<br />
if (i == 0 )<br />
hditem.iImage = Image ID;<br />
else<br />
hditem.iImage = Image ID;<br />
<br />
headerCtrl->SetItem(i, &hditem);<br />
}
Cheers
"Peace of mind through Technology"
|
|
|
|