|
In OpenFile, OFSTRUCT is a output parameter, that returns the opened file attributes.
LPCSTR lpFileName = "c:\sample.txt";
OFSTRUCT ReOpenBuff ;
HFILE hFileHandle;
hFileHandle = OpenFile(lpFileName,&ReOpenBuff,OF_SHARE_EXCLUSIVE );
Величие не Бога может быть недооценена.
|
|
|
|
|
|
Hi ARJ09,
is there a way to put/asign the OpenFile to another file name. Like
FILE* f;
f = OpenFile(.......);
Cos i need the f for fscanf
fscanf(f, "....", &a,&b);
|
|
|
|
|
Nicholas Amh wrote: is there a way to put/asign the OpenFile to another file name.
Yes, just use a different name. You should read up on the use of variable names in C++.
|
|
|
|
|
OpenFile returns HFILE, so using FILE* is not good.
and aviod fscanf.
Even OpenFile is not good in 32 bit application, the better approach is CreateFile([^]) which returns HANDLE.
Величие не Бога может быть недооценена.
|
|
|
|
|
Do anyone know the code for displaying the selected items and its child items of a treecntrl into a listcntrl?
|
|
|
|
|
Well Tree and List View control have methods (if you're using MFC ) or messages you can exploit (You're a developer, right?)
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 articles]
|
|
|
|
|
I am a fresher in MFC. That is why asking such questions.
|
|
|
|
|
Have a look at documentation, see, for instance, "using CTreeCtrl " [^] and "using CListCtrl " [^].
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 articles]
|
|
|
|
|
hi all, I want to develop a program which can not be seen by task manager or other process monitor tools.
Generally, there are three ways to do this:
1) write this program as system service
2) thread injection to inject my program into other process
3) hook the task manager messages
Is there any other methods?
|
|
|
|
|
Yes, they are all well documented in the "VirHack - The Definitive Guide to Virus Programming" book.
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 articles]
|
|
|
|
|
, thx.
|
|
|
|
|
hi,how can i find this book.
i googled and find nothing.
|
|
|
|
|
Ever heard about something called "Irony" ?
|
|
|
|
|
Cedric Moonen wrote: Ever heard about something called "Irony" ?
Sory sir, can't findz "Irony" book too, plz plz u gimme linkz (urgentz)...
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 articles]
|
|
|
|
|
CPallini wrote: Sory sir, can't findz "Irony" book too, plz plz u gimme linkz (urgentz)...
Its coz you spelled it wrong: should be 'Ivory'. 
|
|
|
|
|
You shouldn't be doing it.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Anyway, just for fun.
In fact, a windows service is enough to finish my job. 
|
|
|
|
|
It won't "finish" the job. Task manager will show a service under the "Services" tab.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
These methods are not suitable.
you can hook the API OpenProcess or TerminateProcess,then to filted other process to use this API to open you process.
|
|
|
|
|
Simply update the process linked list.
|
|
|
|
|
Care to eleborate or do I sense that you can't really code at all pass your days looking at VB?
|
|
|
|
|
Hi all,
I have made a application and its crashing and suror points to this function
void __declspec(noreturn) AFXAPI AfxThrowMemoryException()
{
THROW(&_simpleMemoryException);
}
I understand its memory exception, but can anybody help me in unde3rstanding it better
Thanks in advance
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
You need to provide the stack trace so that we know where the call comes from.
|
|
|
|
|
Using the debugger, have a look at the call stack window.
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 articles]
|
|
|
|