|
How can I use drag'n drop to get the HWND of the target application window? Is it possible ?
thx
<view next="">
|
|
|
|
|
WindowFromPoint(CursorPos);
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
|
Hello,
I need to use a dll file (that I downloaded from the net) in my MFC VC++ application, but I am new to dll's and VC++ and don't know where to start. I was hoping that someone knew of a document that I could read that would show me how to do this.
Thanks,
Aoife
|
|
|
|
|
What kind of a DLL you have downloaded,
and how do you intend to use that..
|
|
|
|
|
Typically, the DLL is going to come with a header file and an import library.
1) Simply include the header file where you need to - either in the file that will be references any of the DLL's exported types or functions) or in the stdafx.h file
2) Add the import library to the project.
3) Place the DLL in one of the following folders
(This is the order windows searches for DLLs)
The current folder
The Windows folder
The Windows system folder
The folder where the main application is being run from
The folders listed in the PATH environment variable
A mapped network folders
Let me know if you need any more help.
Cheers,
Tom Archer
Author, Inside C#
Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
|
|
|
|
|
If the DLL doesn't come with an import lib, you can get at an exported function by using GetProcAddress() . However, you'll still need a .h file that describes the function's prototype.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hello.
I have a problem sending packets at the right time. My app sends a packet (16-100kbytes) each 10 seconds... but they are paired up and received as 2 packets each 20 seconds. I used setsockopt with no_delay set to 1 and it didn't help. My send buffer is 8192 bytes, I use win98 and winsock 1.1
How can I force winsock to send each packet separately ?
Any help would be appreciated...
|
|
|
|
|
Hi,
Actually, it might be that the packets are buffered and
sent when buffer is full (normal behavior)..
So you have to flush the data from the buffer
so that it writes the data.
Sameer
|
|
|
|
|
Yes, that's what I am trying to do...
Do you know how to flush the data using windows sockets 1.1 ?
I think I should switch to winsock version 2.2, there is a SIO_FLUSH command in WSAIoctl()... anyone used that with positive outcome ?
|
|
|
|
|
Winsock buffers data, but does not wait as long as 10 seconds (by default, it's buffering time, i.e. the time it waits for more data before flushing to the net, is 100 ms.) So I'd say the problem is somewhere else.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Yeah, you were right... the problem was one else statement which somehow got commented out and I don't know why...
Thanks m8 I was almost ready to switch to w2k ...
|
|
|
|
|
Hi,
I've created a DLL and exposed two functions InstallHook
and DeleteHook
Actually one of my application hooks this dll for getting
the application which have started on my computer
The problem is that, i am writing all that in a
log file (a simple .txt file), but the filename is
Hard Coded. How can i make this filename such
that, my dialog based application which is actually
initiating this DLL pick up this filename.
|
|
|
|
|
Pass the filename along as a command line parameter. Read this parameter in your InitInstance using CCommandLineInfo (for example.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
I can't pass any arguments..
Actually i have an MFC application which inturns just calls
the Install Hook function, which in turn sets the hook
to the system..
So even if i pass argument to Installhook, it cannot send the argument to my DLLMAIN function..
|
|
|
|
|
Is there enough interest in MC++ to warrant a separate forum?
cheers,
Chris Maunder
|
|
|
|
|
YES!
Cheers,
Tom Archer
Author, Inside C#
Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
|
|
|
|
|
I've not seen a lot of MC++ questions asked in the C++ forum so I'm not sure the demand is there yet. If there isn't a lot of work to add the new forum then there is no reason why a seperate forum can't be created, I'm just not sure that people still wouldn't post the questions in the C++ forum as that is the one which will get the most views.
Michael
|
|
|
|
|
Chris Maunder wrote:
Is there enough interest in MC++ to warrant a separate forum?
Yes Chris. It's a good idea.
If we have a MC++ forum, there will be questions asked.
Right now people might be scared to ask for fear of being ridiculed.
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
I don't think so, but it's hard to say. I'd vote for it being created though, although I'll never use it. It can't possibly be as dead as the XML/XSL forum.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Christian Graus wrote:
It can't possibly be as dead as the XML/XSL forum
I think you should say that louder while looking over at Paul Watson when you say that
(damn - he's not here)
cheers,
Chris Maunder
|
|
|
|
|
Yes
Hopefully(if made available), there is enough interest in it to keep the forum busy.
Kannan
I am not here to accommodate the requirements of mass hysteria.
|
|
|
|
|
|
I don't know, but I can say I'm enough uninterested in it to not want to see discussions about it in a C++ forum.
|
|
|
|
|
Hi,
Can i programmatically stop users of Windows 98
from changing some system parameters like
- Network Identification
- Machine name
I mean, some kind of a Hook can be applied which
can monitor and stop certain things.
Please help
Regards
Sameer
|
|
|
|