Jun 14, 2009 at 11:10pm
how will u write below to a empty file ?
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
1 2 3 4 5 6 7 8 9 10 11
|
string write_stuff = "
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
"
WriteFile(handle, write_stuff, Bytes_that_need_to_write, BytesWritten, NULL);
|
does it OK? or need to write a new line by /n (C syntax) ?
Last edited on Jun 14, 2009 at 11:23pm
Jun 15, 2009 at 12:40am
i find a usfel example just before
/n is before the line need to output~ ~
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
include <iostream>
size_t getPtrSize( char *ptr )
{
return sizeof( ptr );
}
using namespace std;
int main()
{
char szHello[] = "Hello, world!";
cout << "The size of a char is: "
<< sizeof( char )
<< "\nThe length of " << szHello << " is: "
<< sizeof szHello
<< "\nThe size of the pointer is "
<< getPtrSize( szHello ) << endl;
}
|
Last edited on Jun 15, 2009 at 12:49am