|
I need optimised hash table code implementted in C++ for my project.Can any body post me the source code?
fawadNaseeem
modified on Thursday, May 15, 2008 11:12 PM
|
|
|
|
|
Hi.
I want to understand that which program is using my dll. Can dll understand itself or , another program.Anybody have idea about this.
|
|
|
|
|
No reason why your Dll can't call GetStartupInfo[^]. That should get you at least the basic information you're after.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Hi experts,
I have an activex control that is placed on a dialog. At runtime I have the nIDs of all the controls so, by using function GetDlgItem I am able to get the pointer to that activex control as CWnd*.
So, My question is how can I get that activex class name or how can i identify whether the pointer is of activex class or not. I have already used typeid, CRuntimeClass, and dynamic_cast but unable to get the required result.
Please help me in resolving it.
Regards,
Pankaj Sachdeva
There is no future lies in any job but future lies in the person who holds the job
|
|
|
|
|
I can't see why GetRuntimeClass wouldn't work for ordinary controls and dynamic_cast to IUnknown wouldn't work for Ax Controls. Just be prepared to handle the exceptions when you try the wrong one. I have no idea why you'd want to do this anyway, don't you know which controls are ActiveX control already, having put them on the dialog
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Hi,
Have you tried CObject::IsKindOf ?
Regards,
Paresh.
|
|
|
|
|
How do I get the size of any file that I am reading in VC++.
ifstream myfile;
myfile.open(path);
THANKS
|
|
|
|
|
Is it to solve this problem? If yes, please use the registry or an ini file to store your application related information. Those APIs exist for this very purpose.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
and you're going to delete your question once someone replied to you ?
check the CFile class for any File related operations...
|
|
|
|
|
toxcct wrote: and you're going to delete your question once someone replied to you
Well said.
|
|
|
|
|
Have you considering using GetFileSize() or GetFileAttributesEx() ?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
long file_len;
ifstream myfile;
myfile.open(path);
myfile.seekg(0, ios::end);
file_len = myfile.tellg();
myfile.close();
------------------------------------------
variable file_len's value is file length.
|
|
|
|
|
hai all masters,
here is my problem.
i want to access a hardware device(server) through TCPIP.
i know its ip address, and i want to write an application(client) to access it. but i donot know the port number.
is there any way to access it with out knowing the port number?
if any more clarity is required, then i can provide.
please give your views on this.
thanks in advance.
|
|
|
|
|
chandu004 wrote: is there any way to access it with out knowing the port number?
Of course:
(1) choose randomly a port
(2) are you able to communicate with the device?
(3) if the answer is yes then you're a lucky guy.
(4) if the answer is no, goto point 1.
That's called Montecarlo TCP/IP .
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
|
|
|
|
|
thanks pallini,
of course i have tried that before posting it here. i tried from 0 to 10000. but no use
any way let me provide you more details such that, you can help me.
1.the device is access control system(card swipe system) in our office.
2.the vendor has provided his software, which will download the swpe logs to the PC.
3.for some reasons, i wanted to have my own software for that.
so, i did the following things.
1.i made a session in hyperterminal using tcpip with the device ip and default port number 23.
2.then the device responded with welcome note, version number and a login prompt at my hyperterminal.
3.so here, i under stood that, i have to provide some username and pwd.
so i tried to simulate the server(the device) through my application and communicate with his software and find the username and pwd.
but the application is unable to communicate with my simulator.
any ideas on this?
please excuse me members, if my post is a bit lengthy.
|
|
|
|
|
I was just kidding, of course. Why don't you issue the netstat command (from command prompt) while the device is connected with vendor software to see involved ports?
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
|
|
|
|
|
wov thats wonderful. i was exactly looking for such a tool.
but it gives me the results all at a time. not in real time.
i mean, if i start it, and then start his application from another system, then it(netstat) should show me the commands that got transfered from one port to other.
any way, i shall look into the options of it and get back to you.
or if you have any idea of such an application then please forward me its url.
thanks for the clue.
|
|
|
|
|
but how come did the device respond to my hyperterminal with port number 23?
any idea on this?
and more over, with other numbers it is not responding.
|
|
|
|
|
It accepts telnet connections. However maybe the vendor software uses another port to communicate.
Why don't you ask the vendor?
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
|
|
|
|
|
yes i tried that even,
but he said it is not possible so easily.
and he want to take his own time to give me the techical details.
but iam not sure about him.
|
|
|
|
|
netstat could not give me the exact information that iam looking for.
can you suggest me any other idea to achieve my goal?
thank you.
|
|
|
|
|
Nope. Try the Hardware / Device Drivers [^] forum.
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 application gets minimized by a button and get added in task pane .on rt clicking the icon in task pane a menu appears tht doesnt hide on clicking anywhere on the screen.
Prabhat Singh
|
|
|
|
|
Owner-draw or standard menu?
System menu or user-tracked pop-up menu?
If it's owner draw, have you checked to see that you're calling ReleaseCapture to give the mouse back to the rest of the system?
Also, check your code surrounding any OnMouseLeave events or OnMouseOutOfWindowForTooLong timer events.
S
|
|
|
|