Link to home
Start Free TrialLog in
Avatar of Jayu_is_here
Jayu_is_here

asked on

C# and handle to Clipboard

hi

I am trying to copy an image to a clipboard and then get a handle to the clipboard using API calls GetClipboardData() in C#.

Following is the snippet of our code. Could any one please point out what am I missing here since I never get the handle to the object on clipboard

<snippet>
OpenClipboard(0);
DataObject m_data = new DataObject();
m_data.SetData(DataFormats.Dib,imgCardImage.Image);
Clipboard.SetDataObject(m_data,false);
hDib = GetClipboardData(CF_DIB); // CF_DIB = 8;
</snippet>

hDib returned is always 0 where it actually had to return a handle to the clipboard;


Thanks in Advance.
ASKER CERTIFIED SOLUTION
Avatar of tgannetts
tgannetts

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jayu_is_here
Jayu_is_here

ASKER

Tom,

We need a handle/pointer to the image in the memory. We need to pass this pointer to another API which expects a pointer to the image to store the image.

jayu
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
just on } missing to close the namespace :)

(fast copy/paste :)

--
vascov
Jayu, did this help ?

Did it solve your prob ?
Jayu ?

Did this help you solve your problem ?

Further assistance ?

Thx