|
I am very sorry, forgot mentioning this. I am wanting to profile my VC++ application in VS 6.0 and VS 9.0.
I am not sure if the mentioned would solve my purpose. Lastly but not the least thanks for replying.
|
|
|
|
|
i have windows xp home edition sp2.
i am working in visual C++ 6.0.
i have a chatter client (Sample).
i don't know how to connect to sever.
how can i make server on my laptop.
i want to know possible solutions.
Thanks
Bye
|
|
|
|
|
If you have the visual C++ 6.0 installed on your laptop as well, simply copy a chat server from the internet and run it. Get the IP of your laptop and ask the client to connect to the server using that IP.
|
|
|
|
|
i have copied the server(Sample of visual C++) from internet. but how can i get the ip address.
|
|
|
|
|
actually i have to just check the sample program of visualC++ 6.0
a)CHATTER
b) CHATSER
for chatter it asks me to provide the
1)handle.
2)Server
for server it asks me to provide
1) channel.
now what should i do
|
|
|
|
|
Hi,
How to remove or changing the color of the splitterbar between two panes?
|
|
|
|
|
I while back I found on Code Project a menu system that behaved like the ones found in 3DS MAX. However I have been through all of the menu controls and can't find it.
I wonder if anyone knows where it is located for me?
|
|
|
|
|
|
I remmeber a article but it is for DialogBar
|
|
|
|
|
That's the one, thanks. Wouldn't of thought about looking in DialogBar. Went through Menu and Lists but turned up nothing.
Thanks!
G.
|
|
|
|
|
Is there any good Detours 1.5 API references or documentations out there ?
I have read through Detours.pdf and sources like verify.cpp and still
lack of informations to understand sample sources given.
eg: from VERIFY.CPP
static VOID Dump (PBYTE pbBytes, LONG nBytes, PBYTE pbTarget)
{
for( LONG n=0; n<nbytes; n+="16" )=""
="" {
="" printf("="" %08x="" (="" %i="" bytes="" ):="" ",="" pbbytes="" +="" n,="" nbytes);
="" for(="" long="" m="n;" m<n+16;="" m++="" )
="" if(="">= nBytes )
{
printf(".");
......
}
VOID WINAPI Verify (PBYTE pbCode)
{
Decode("Original", pbCode, NULL, 3);
Decode("DetourGetFinalCode with Skip JMP", DetourGetFinalCode(pbCode, TRUE), pbCode, 3);
Decode("DetourGetFinalCode no Skip JMP", DetourGetFinalCode(pbCode, FALSE), pbCode, 3);
}
Q1: What is cfSkipJmp in DetourGetFinalCode() ?
Q2: What is the return of PBYTE in DetourGetFinalCode() refers to ?
Q3: What is n+=16 means for ?
I think the answers will be quite low level, but I really need extra informations
in order to understand what the source trying to give.
I have read through Detours.pdf but still I found insufficient to understand as
the questions stated above.
Any advise is appreciated.
Thank you.
Best Regards,
Ricky Gai.
|
|
|
|
|
I prefer more BoxedApp SDK. It costs much cheaper, but in the same time works much perfectly!
|
|
|
|
|
Hello guys!
I want to share an object between two DLLs. One DLL is managed and the other is unmanaged. I was panning to create an extra DLL and declare a class as in the shared data segment. But things don't seem to be working so far. How would you guys do this?
Thanks in advance.
Abhishek
It is impossible to change your past. But it is possible to ruin your present by worring about the future.
-Chankya
|
|
|
|
|
Is there any good Detours 1.5 API references or documentations out there ?
I ahave read throught Detours.pdf and sources like verify.cpp and still
lack of informations to understand sample sources given.
eg: from VERIFY.CPP
static VOID Dump (PBYTE pbBytes, LONG nBytes, PBYTE pbTarget)
{
for( LONG n=0; n<nbytes; n+="16" )=""
="" {
="" printf("="" %08x="" (="" %i="" bytes="" ):="" ",="" pbbytes="" +="" n,="" nbytes);
="" for(="" long="" m="n;" m<n+16;="" m++="" )
="" if(="">= nBytes )
{
printf(".");
......
}
VOID WINAPI Verify (PBYTE pbCode)
{
Decode("Original", pbCode, NULL, 3);
Decode("DetourGetFinalCode with Skip JMP", DetourGetFinalCode(pbCode, TRUE), pbCode, 3);
Decode("DetourGetFinalCode no Skip JMP", DetourGetFinalCode(pbCode, FALSE), pbCode, 3);
}
Q1: What is cfSkipJmp in DetourGetFinalCode() ?
Q2: What is the return of PBYTE in DetourGetFinalCode() refers to ?
Q3: What is n+=16 means for ?
I think the answers will be quite low level, but I really need extra informations
in order to understand what the source trying to give.
I have read through Detours.pdf but still I found insufficient to understand as
the questions stated above.
Any advise is appreciated.
Thank you.
Best Regards,
Ricky Gai.
|
|
|
|
|
Hello
I am doing some keyboard hook program.
I am able to hook it and disable the inputs of some keys in the application.
But If I am shifting to other application say VC++ id and coming back to my application the application no more hooking the keys.
I want to hook the keys for all the application. i.e I want to disable some keys for all the application.
Is it possible? give me some hint to proceed
Thanks
Regards
Anil
|
|
|
|
|
For a hook to be globel, u must write the hook procedure in a dll. Paste the code here so that we can check whats wrong with it..
nave
|
|
|
|
|
Thanks for your quick response
I have not done much but still you can check the code
This is the code from the dll Just have 3 function now
Install Uninstall and the global Keyboar procedure.
<br />
LRESULT CKeyHook::InstallKeyHook()<br />
{ <br />
g_hHook = ::SetWindowsHookEx(WH_KEYBOARD, KeyboardProc, AfxGetInstanceHandle(), 0);<br />
return( KH_OK );<br />
}<br />
<br />
LRESULT CKeyHook::UninstallKeyHook()<br />
{<br />
::UnhookWindowsHookEx(g_hHook);<br />
return( KH_OK );<br />
}<br />
<br />
LRESULT CALLBACK KeyboardProc(INT nCode, WPARAM wParam, LPARAM lParam)<br />
{ <br />
switch (nCode)<br />
{<br />
case HC_ACTION:<br />
{<br />
return 1;<br />
}<br />
}<br />
return ::CallNextHookEx(g_hHook, nCode, wParam, lParam); <br />
}<br />
The test application just call InstallKeyHookin InitDialog
and UnInstallKeyHook in OnClose.
Regards
Anil
|
|
|
|
|
_anil_ wrote: g_hHook = ::SetWindowsHookEx(WH_KEYBOARD, KeyboardProc, AfxGetInstanceHandle(), 0);
i think the problem is with the AfxGetInstanceHandle() used here. What i suggest is create a globel variable of HINSTANCE and set this parameter with the HINSTACE coming in the dll main. If ur using an MFC dll, set this variable as follows
BOOL CDllApp::InitInstance()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
hins=AfxGetInstanceHandle();
return CWinApp::InitInstance();
}
now pass this variable in the SetWindowsHookEx function
nave
|
|
|
|
|
Superb Its worked.
Now please tell me what is the difference beteewn the two?
Why did you think that that should be the error place.
Regards
Anil
|
|
|
|
|
sorry it wasn't the problem of taking the hinstance value in InitInstance. It was the problem of not calling AFX_MANAGE_STATE(AfxGetStaticModuleState());
i tried calling AfxGetInstanceHandle() from a dll as follow.
HINSTANCE h2 = AfxGetInstanceHandle();// Returns the instance of the exe
AFX_MANAGE_STATE(AfxGetStaticModuleState());
HINSTANCE h = AfxGetInstanceHandle();// Returns the instance of the dll
now i think u understood the problem.
nave
|
|
|
|
|
hi,
in an edit control if multiple characters are selected and user presses delete button how we can deleted text that is "selected text" in WM_KEYDOWN or
OnKeyDown handler??
same thing with OnChar also for backspace!!
Thanks and regards
Harshal
|
|
|
|
|
Call the CWnd::OnkeyDown() in the overrided Onkeydown()
Rinu Raj
|
|
|
|
|
hi rinu,
thanks for replying.
but what i want to do is something different
suppose "abcd" is the selected text and the caret is
positioned before 'a' and if someone presses delete
whole text will delete so i want to retrieve that text before it gets deleted.
means i want abcd to be stored in some buffer or CString variable
thank's
Harshal
|
|
|
|
|
You may check whether the DEL key is pressed in the OnKeydown() If it is pressed then store the edit box content in a string variable. After that call the CWnd::OnKeydown()
Rinu Raj
|
|
|
|
|