|
-
August 26th, 1999, 02:10 AM
#1
Saving data to DLL?? is it possible?
yoo there...
whats the best way ( if its opossible) to save data (lets say.. passwords,bmp..)
and how can i do it???
i try to use the UpdateResouce() but no use...( the code works fine while the app runing but when i close and restart it the resource isnt saved)
is there any other way to do it???
thanks
kishk91
-
August 26th, 1999, 05:53 AM
#2
Re: Saving data to DLL?? is it possible?
All think are possible, a solution is to add a ressource like Bitmap in the dll, ressource are store in the dll without any compression so, open the dll in write mode, search the begin of the bitmap ( Look with an hexedit the begin of the file ex : BM......... ) and write on it.
FILE *FPtr = fopen ( "c:\\windows\\system\\my.dll", "wb" );
...
fclose ( FPtr );
If you want to optimise time store the possition in INI during the 1er search.
Take care to one think Un Virus store a CRC of dll to see if she was modified by virus so it can generated error with this sorte of programme ...
A++
-
August 26th, 1999, 06:47 AM
#3
Re: Saving data to DLL?? is it possible?
ok.. now this was for BMP
but if i wanna something else like user name and password?? (plain text???)
how do i do this??
is there and special thing i should do ?
thanks
kishk
-
August 26th, 1999, 08:09 AM
#4
Re: Saving data to DLL?? is it possible?
FILE *FPtr = fopen ( "c:windows\\system\\mydll.dll", "wb" );
long Pos = MyFonctionWhoGiveMeThePosOfMyBmp ( FPtr );
fseek ( FPtr, Pos, SEEK_SET );
fwrite ( &MyLogin, 1, 256, FPtr );
fwrite ( &MyLogin, 1, 256, FPtr );
...
fclose ( FPtr );
The Bitmap is here only to give you some space to write in the DLL, don't use it in your app.
The code is to write the login and password to read open with "rb" and use fread
Take care to the size you read and write, you mustn't read or write info > Bmp Size ( the size of the .bmp file ).
A++
-
August 26th, 1999, 08:16 AM
#5
Re: Saving data to DLL?? is it possible?
ok... ill try it...
what about the UpdateResource() any use of this func in this case??
if it is.. any idea how do i use it?
( i know how to use it but with what resource??)
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|