|
No you can't change the modeless settings. All that modeless means is that it uses the main message loop to get access to its messages. A modal dialog box creates and uses its own message loop.
Have you tried to set the ZOrder of the windows in order to make your dialog set behind the main one? Use SetWindowpos for this.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
It's useless. I've tried and it has no effect. Despite this, i can
successfuly hide the modeless using SetWindowPos.
rechi
|
|
|
|
|
|
Try this
BOOL ReadProcessMemory(
HANDLE hProcess, // handle to the process
LPCVOID lpBaseAddress, // base of memory area
LPVOID lpBuffer, // data buffer
SIZE_T nSize, // number of bytes to read
SIZE_T * lpNumberOfBytesRead // number of bytes read
);
|
|
|
|
|
thanks! i need full source code!
|
|
|
|
|
|
|
Have you looked at PEDUMP. It is a sample program by Matt Petriek in MSDN. It shows how to walk through the PE file format and extract all of the information including the import table.
One thing that you will need to do is resize the file in order to accomodate the new entry because there is no extra space for new entries.
Another thing to worry about is Windows 2000 and up will complain if you try to change any of their executables.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
|
Can somebody please give me URL to any utility for searching a string withing another string. I know VC++ is very powerful. I want to use the utlity in Visual Basic. It would be nice if there is utility in DLL form which I can use in Visual Basic. Does someone know. Please help me.
|
|
|
|
|
Can't you use built-in function InStr for this purpose? My guess is that its performance will match that of any regular implementation in C++.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
How do i close my application in InitDialog()
According to some checkings i want to terminate
my application..
I've tried EndDialog.. and DestroyWindow()
Please help
|
|
|
|
|
As i understand, your application is a dialog-based one?
rechi
|
|
|
|
|
Yes, my application is a Dialog Based MFC Application
|
|
|
|
|
Then, it should work with EndDialog.
I've created a test application and i've put:
EndDialog(0); // adding this!!!
return TRUE; // return TRUE unless you set the focus to a control
The application is stopping immediately.
rechi
|
|
|
|
|
You can call EndDialog, but don't use '0' as argument: use IDOK or IDCANCEL instead.
--
Alex Marbus
www.marbus.net
But then again, I could be wrong.
|
|
|
|
|
OK, OK...
0 was just a random value to see if EndDialog works fine.
rechi
|
|
|
|
|
You can use 0. You can use 13259. The argument to EndDialog is just the value that is returned to the application. IDOK and IDCANCEL are used so application can tell which control closed the dialog.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
I will sonn start a big Client/Server project and I have a question about backdoors (if you know what I mean?).
How to prevent them? It's a difficult question but is there any documentation on the net which the most common backdoors is?
I want to write a safety server with no leaks!
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
ummmm it totally depends on what server platform you use
if you use iis there are known holes and fixes and whatnots
linux / unix the same
if you were to write your own say web server you could make it hack proof to a large extent a) because you know exactly what does what and b) cos the hackers dont know the system
its kinda a vague answer to a vague question
situations to avoid #37: "good morning ... how many sugars do you take in your coffee ... and what was your name again?"
coming soon: situations to avoid #38: "...and the dog was there too?"
|
|
|
|
|
lauren wrote:
its kinda a vague answer to a vague question
Well, I predicted it wouldn't be easy to answer.
I building a TCP/IP server in Win32 API and it's gonna be a server that handle unlimited connections and it's a chat server. Is there any leaks that can take a hacker into the system if I run the server on:
1) WinXP
2) Linux
3) Win9x
4) Win2000
I know as I said before that this isn't an easy question to answer, but I just want to know if there is any specific leaks or something that I might know!
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Buffer under/over runs, though people accidently , or even maliciously passing strings/streams of data, that can cause your custom protocol to fail. This is largely seen in C++ imlpementation though the use of pointers or unchecked arrays, that can go below or above the array boundaries. Not only could data become corupted like this, clever malicous programmers can exploit these weakneses, and inject there own binary code that executes correctly and allows then to execute thier own code on the server, quite often as a worm or virus - e.g. Nimida, or what ever it is called.
Where as with a langage like VB this kind of thing is less likley to happen. With VB for example there are still weaknesses that can be exploted with poorly implemented code. But then you don't often write severs in VB that handle multimepl connections.
The clasic example is for a web server. A user passes a URL of a page to be served e.g. http:\\localhost\index.htm
A bad implementation would just chop off the http and host name and convert it to the currect webroot folder, so that a malformed address such as http:\\localhost\..\..\a_file.txt
would be transalated to extract a file two folders above the webroot folder though the .. in the path!!
Think about ways in which someone implementing a custom client for your server could accidently malform the protocol or data passed, and how the server would handle it. e.g. The first 4 bytes of your custom protocol indicate how many bytes are in the buffer, when in fact more have been passed. Validate everything.
Hope this helps,
Giles
|
|
|
|
|
If I always check what data my server recevies and check if it's a valid command and then do something. If a string that is unrecognized will be sent to the server it just ignoring that string and keep call recv()....
shouldn't it be pretty impossible for Nimba viruses to execute their self??
I mean, I check what kind of string that my server receves and so...
if my custom protocoll on my server has commands like:
MSG Hello developers out there! MSGEND\t\t
FIL file_data_goes_here FileName.exe
you see that each command have 3 letters. And if I check the string that receves if the 3 first letters is MSG or FIL then I keep going and handle the commands, but if the 3 first letters is unrecognized by the server it just ignore the receved string and keep listening...and if it repeates too many times you could close the connection to to the client...
Isn't that good enough, Giles?
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
I building a TCP/IP server in Win32 API and it's gonna be a server that handle unlimited connections and it's a chat server.
Perhaps you should have a look at the existing IRC servers? From what you wrote it seems you're trying to reinvent the wheel.
|
|
|
|
|
Hi,
How can i check whether a directory exists or not..
suppose i want to check for a directory
"C:\ABC\DATA"
"C:\ABC\MAM"
|
|
|
|