|
Using LockResource (as I said in my previous post), you can get a void pointer to the data (read only!), and using SizeofResource you get the amount of data.
So, you just need to save this lump of data to a file using WriteFile... Just as you would save any other lumps of data.
Have a look at GetTempFileName to get the filename for a throwaway file,
CreateFile to create it (oddly enough)
and WriteFile to save data into it.
If you look at the documentation for those, you should be good to go.
Iain.
Iain Clarke appearing in spite of being begged not to by CPallini.
|
|
|
|
|
hi...
how can i store images to sql database?
how can i retreive image from sql database?
please help me. am trying this for last few days...
but still i didn't get...
thank you...
paulraj
|
|
|
|
|
gnanapaul wrote: but still i didn't get...
There is an SQL forum. Maybe the people there can help you? This sounds more like a database question than a C++ one.
I'd help you if I could, but I have no idea about ODBC etc.
Iain.
Iain Clarke appearing in spite of being begged not to by CPallini.
|
|
|
|
|
gnanapaul wrote: how can i store images to sql database?
As a BLOB.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
am using sql 2005.
so there is an image data type only.
can you pls post sample code for image/BLOB.
if you post that will be very usefull for me...
paulraj
|
|
|
|
|
It's been many years since I've used SQL, but surely the concept is still the same. See here.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi
i have a application to encrypt the data using cstring
if any one of u post very simple encryption and decryption algorithm it will be helpful for me .
with advanced tkanks
francis
Franics K Antony
|
|
|
|
|
There is a CryptAPI in windows which you can use. It will be better than anything *I* can write. And if you're asking the question, it will be better than anything *you* can write either.
Iain.
Modified: Might be CryptoAPI. CryptAPI would be controlling the undead.
Iain Clarke appearing in spite of being begged not to by CPallini.
modified on Thursday, February 07, 2008 4:57:32 AM
|
|
|
|
|
Iain Clarke wrote: CryptAPI would be controlling the undead.
I wonder what functions/methods it would have...
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Iain Clarke wrote: Modified: Might be CryptoAPI.
Also known as CRAPI.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Francis K Antony wrote: if any one of u post very simple encryption and decryption algorithm it will be helpful for me .
In your first sentence, you claim to already have such an application.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello all,
My reqirement is to download .CAB file containing OCX, EXE, INF files over net from specified URL. Having been downloaded .CAB file, it shold be self extracted and in turn call .exe on client machine That is, it should be autorun. If my OCX and exe is already there on remote machine then it should not download again and run existing one.
Please help me out. Any help is highly appreciated.
Thanks & Regards,
Hemang
|
|
|
|
|
What are you struggling with? I assume you've done some work already.
Can you download files? Can you extract files from CABs? Can you use CreateProcess? etc.
You're question needs to be broken into bite size chunks.
Good luck,
Iain.
Iain Clarke appearing in spite of being begged not to by CPallini.
|
|
|
|
|
I want to download exe and run that exe from decided/desired default directory(C:\Windows). But i am not able to download it. I also require WSOCK.dll for my EXE. I am attaching my INF file code snippet to make things clear. I hope that from this code snippet you will be able to understand and help me out.
[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[Add.Code]
CaptureActivex.ocx = CaptureActivex.ocx // My OCX
msvcrt.dll=msvcrt.dll
mfc80.dll=mfc80.dll
olepro32.dll=olepro32.dll
[CaptureActivex.ocx]
file-win32-x86=thiscab
clsid={C3525B97-002E-4062-8CBE-2A3B06FD39FE}
FileVersion=1,0,0,1
RegisterServer=yes
[msvcrt.dll]
FileVersion=7,0,3790,3959
hook=mfc80installer
[mfc80.dll]
FileVersion=8,0,50727,762
hook=mfc80installer
[olepro32.dll]
FileVersion=5,2,3790,3959
hook=mfc80installer
[mfc80installer]
file-win32-x86=http://activex.microsoft.com/controls/vc/mfc42.cab
run=%EXTRACT_DIR%\mfc42.exe
Thanks & Regards,
Hemang
|
|
|
|
|
Hemang Raval wrote: I want to download exe and run that exe from decided/desired default directory(C:\Windows). But i am not able to download it.
Perhaps you could show us what you have already tried to code, from there we may be able to point you in the right direction.
Waldermort
|
|
|
|
|
I have made an Activex control using MFC Activex Dll. Then I tried to call an EXE from that ActiveX.
For that I made cab file containing my OCX, EXE, dll, and INF files. Then after i tried to download an active control by using HTMl file located on some web server. This should extract cab file and in turn install and run EXE to and from desired location which i set from INF file. It is most probably C:\Windows. now can you tell whether i am folllowing correct path or not.
Thanks & Regards
Hemang
|
|
|
|
|
Hemang Raval wrote: But i am not able to download it.
So why bother with anything else until you get this one piece figured out? Don't intentionally over-complicate things.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I wrote some class that derived from the class CDialog.
In my new class i have some object control on some CList.
I also have some other class that have pointer to this CDialog - and in some place in the code - i call Create method of this CDialog - and ShowDialog.
Until here all work find. But when i press button RefreshList that belong to the derived class i see that the CList control object is null and i don't understand why
Can someone help me ?
Thanks
|
|
|
|
|
Do you mean CList as in a list of objects, or CListBox / CListCtrl?
If it's a list - do you mean NULL, or just empty? If it's NULL - then why are you using a pointer? And at what point do you create a new List to point to? If you don't create one, then of course it's NULL.
If you mean it's empty, then do you put things into it? And if you do, look for any code that removes them.
If you mean a control, then you need to point the object at a window. Look up DDX_Control in the help files for information.
Iain.
Iain Clarke appearing in spite of being begged not to by CPallini.
|
|
|
|
|
Do you have any call this object of other place except this dialog?
|
|
|
|
|
No - only calling this object in pressing dlg button ( in same class )
|
|
|
|
|
So did you use of pointers on your project?
|
|
|
|
|
Hi all
I have a rather strange requirement . My current feeling is Shell Programming but not sure what I have to do ..
Well ,
Is there any way to launch IE proxy setting dialog(IE->Tools menu ->internet options->connections tap ->LAN settings) from .net application ? the requirement is proxy setting dialog box alone should popup(not along with IE) if we click a button in the application. In fact I saw some Win32 APIs like WinHttpGetProxyForUrl ..are avilable to get/set the same but I prefer the "original IE dialog" to appear and get set .
Could any of you please throw some light on this ? Is it possible in the first place ?
Thank you in advance for your help.
regards
Bala
|
|
|
|
|
Bala.A wrote: from .net application
You'll get more help in one of the .net forums. If you've posted this question in 17 different forums, then you're a very naughty boy.
Iain.
Iain Clarke appearing in spite of being begged not to by CPallini.
|
|
|
|
|
Hello everyone,
1. Generally speaking using GetProcAddress through ordinal is faster than through name, right?
2. Why?
thanks in advance,
George
|
|
|
|