|
I need global hooking to trap messages send by different processes. My main concenteration is trapping messages for
1. Formating a drive
2. Request for opwnging a socket.
3. Whenever a process creates a listnere.
4. Whenever Outlook Express send e-mail.
I serached for it and found out about Hooking functions to a process. But i am still findint it difficult to find out the message numbers for the above mentioned messages. Anyone knows the url aur or any refrenece site, please mail me aur reply this thread.
eINSTEIN
|
|
|
|
|
Granted, I'm a longtime VB, VB.NET guy, but I have a small project in C++ for I have 2 questions. If they're complicated answers, I understand you might want me to do more research, so just let me know.
I am attempting to expose a function from a C++ SDK. I created a new DLL and for testing, created a test function "DoTheMath" which receives a value and returns the value plus ten. I am using managed extensions. THE TEST FUNCTION WORKS!. That is, I declare the DLL in VB.NET, call the test function and receive a return value... So, this works fine.
Now, I bring in my other SDK code and receive the values from VB.NET into an EmbedWM function. This code is executing! BUT, as soon as it hits an external library function
DWM_Get_EmbedCapabilities(&g_dwmCaps);
it says:
An unhandled exception of type 'System.NullReferenceException' occurred in DLLExpose.dll
Additional information: Object reference not set to an instance of an object.
Now, when I place my cursor over &g_dwmCaps it gives me my value which has been dimensioned public, so that can't be it. The only warning give to me before the successful build is that it can't find the libc.pdb. Could that be it?
Secondly, can't I step through the public variable initialization?
Any help, I'd appreciate it. Thx.
Dwaine
|
|
|
|
|
|
You know, I finally just created a blank standard C++ DLL and exported the functions using the .DEF file. It isn't registry friendly, but I can simply wrap it in VB.NET using the declare statement. So... I accomplished what I wanted. Enjoy... and Thx,
Dwaine
|
|
|
|
|
How on earth do you call them? I've tried all sorts of methods, the latest being
MessageBox::Show("Text", "More text");
from a tutorial on the site but I just get compiler errors like
MessageBoxA is not a class or namespace name
or MessageBox is not a part of System::Windows::Forms (when intellisense tells you it is).
The onlt way to do it so far it via
#prgama unmanaged
void CallMsgBox()
{
MessageBox(NULL, "Old style msg box", "Caption", MB_OK);
}
#pragma managed
So how do you call it???
Thanks
Obseve everything, remember more...
|
|
|
|
|
Its silly really MessageBox::Show(S"Text", S"More text");
You need to prepend mamanged strings with a S.
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
leppie,
I think his problem is not with strings. Instead it is that the preprocessor sees that MessageBox is defined as either MessageBoxA or MessageBoxU depending on build enviroment.
The solution should be something like:
...
#undef MessageBox
MessageBox::Show(S"Some text",S"Some text 2");
...
Or maybe I am just on crack or something...
Feel free to flame me...
-Nathan
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
Had the same problem and found the solution in one of Microsoft's articles.
At the beginning of the.cpp file, after the includes, I put the following:
#ifdef MessageBox
#undef MessageBox
#endif
The problem seems to be caused by a confliction in MessageBox declarations between the .Net declaration and the one in the windows.h file.
Cheers
|
|
|
|
|
Hi. Is everybody know how resolve NetBIOS name for some IP ?
PS Don't tell me about gethostbyaddr() . Need resolve NetBIOS rather than DNS.
Thanks
---Ranger---
|
|
|
|
|
Hi,
I'm trying to take an old COM component that I have source code to, and convert it to pure ManagedC++.
It makes use of Direct API calls, and I can get the core of it working.
I'm trying to understand the article written by Nish (Implementing Callback functions using IJW (avoiding DllImport))http://www.codeproject.com/managedcpp/cbwijw.asp[^], but I can't seem to adapt the code correctly.
I'm using the RAS api, and as soon as I integrate Nish's code, I get exceptions that new and delete cannot be used.
Is there an article or site somewhere that covers creation of namespace extensions (if this is infact the correct term).
Any help/pointers would be greatly appreciated.
|
|
|
|
|
Hello,
I'm porting an ActiveX control into a .Net UserControl using Managed C++. What is the equivalent of ActiveX property pages in .Net? If you can give me links to articles or samples that might help me.
Thank you in advance
Daed
|
|
|
|
|
Look at the PropertyGrid class And just assign any (not just activx) object to it with ->SelectedObject.
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
I need more than a simple PropertyGrid, I need to call a dialog and inside this dialog i want to add controls that do specific functions on the properties. This was very easy in ActiveX controls and i am not sure how possible is this now in MC++!!
|
|
|
|
|
Hello,
I'm porting an ActiveX control into a .net UserControl using MC++. In order to support persistency with MFC based ActiveX controls there was the DoPropExchange function: is there some similar function in MC++ UserControls?
I noticed that the persistency of UserControls properties seems to be embedded inside the .NET framework: if I declare a property of class Bitmap, its contents will be automatically saved inside the .resx file: if I should store a binary based property (for example the contents of a WAV file), what should I do? Any example?
Regards
Severino
|
|
|
|
|
|
Hello:
This article tells how to persist data to a file but is there another way to persist the data using the .NET environment itself like what the MFC DoPropExchange function do (internally and not to a dedicated created file) ???
|
|
|
|
|
Apply the DesignerSerializationVisibility attribute to the Properties you need to "persist" the settings from design time to runtime.
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
During the time i compile my VC6.0 project in VC7.0
I get these error during linking process.
TestMC error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@std@@YAXXZ)TestMC error LNK2001: unresolved external symbol "void __cdecl std::_Xran
What are the needed header files or static libraries?
thanks
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
|
MC++?
--
Breaking the law, breaking the law
Breaking the law, breaking the law
You don't know what it's like
|
|
|
|
|
|
--
Breaking the law, breaking the law
Breaking the law, breaking the law
You don't know what it's like
|
|
|
|
|
That is because oftenly, most of project which was developed in VC6 could not be reused in VC7 or Managed C with some problems of could not get most of the libraries link up properly. I just hope to see if there are anyone who came across with the similar problem of which similar linker error could shed some light of pointing out which static libraries or files that I need to additionally include into my project.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
You need to make sure you're pointing at the correct LIB files. Sometimes you have Visual Studio installed libs and Platform SDK libs. Make sure you're only pointing to one or the other.
|
|
|
|
|
i have made a simple web service which calculate addition of 2 numbers(managed C++ web service), i try to use it in another managed C++ application, the first attempt is successful, i add web reference to project and put url to the directory where myProgram.asmx resides, it works, i try to run the application and runs smoothly.
But i try it again by creating another managed C++ application and just do the same thing...now i can't add web reference....when downloading files in progress.....boom....it can't find any web reference in the url i typed before(same url)....sometimes..if i try many times....then error message appear is IIS has encounter a problem and need to close...
I wonder if i need to install something or change setting to overcome this problem.....
Finally...i wonder whether i can create MC++ web service and consumed it in C# application....if yes, how?...is there any tutorial or resources for this?
Thx for answers....sorry for the wordy question
|
|
|
|