473,495 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

impossible read STGMEDIUM from RemoteGetData

i have created a dll with this idl file

//CustomMsHtml.idl
[
uuid(7522A096-44E7-49d1-B082-739671D2B12A)
]
library MsHtmlCustomization
{
import "MsHtmHst.idl";
import "Mshtml.idl";
....
enum tagDOCHOSTUIDBLCLK;
enum tagDOCHOSTUIFLAG;
enum tagDOCHOSTUITYPE;
enum tagSTGMEDIUM; //this don't rule... dont import the enum
....
interface IDataObject;
interface HTMLDocumentEvents2;
};

i'm working with a custom MsHtml and i need to control a dragEnter Event of
this COM so i implement the interface HTMLDocumentEvents2

....
public override void DragEnter(MsHtmlCustomization.IDataObject pDataObj,
uint grfKeyState, _POINTL pt, ref uint pdwEffect)
....

but when i see the dll (with ildasm) the method getdata of IDataObject has
been replaced by RemoteGetData:

public hidebysig newslot virtual abstract
instance void RemoteGetData([in] valuetype
MsHtmlCustomization.tagFORMATETC& pformatetcIn,
[out] native int pRemoteMedium) runtime
managed internalcall

you can see that the pointer to STGMEDIUM is replaced by int pRemoteMedium.

i call to remotegetdata with this code but break:

System.IntPtr STGMEDIUM;
pDataObj.RemoteGetData(ref fmtetc,STGMEDIUM);

the COM must receive a pointer to an STGMEDIUM structure but C# get an
integer.

is a problem of marshalling? is a bug?

some solution for to read the STGMEDIUM of the IDataObject?

tnks in advanced.
Nov 15 '05 #1
0 1079

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
7291
by: Pekka Niiranen | last post by:
Hi, I have used the following example from win32 extensions: -----SCRIPT STARTS---- import win32file import win32con import win32security import pywintypes
1
1768
by: Matt | last post by:
I'd like to overwrite just one line of a binary file, based on a position set by seek(). Is there no way to do this? As far as I can tell I need to read the whole file, change the line, and write...
4
1575
by: Marcel Brekelmans | last post by:
Hi, This is my situation: My ISP doesn't allow me the execute server-code. So, no ASP or otherwise.As a small compensation, they run some CGI scripts that we can use. With one of these...
383
11775
by: John Bailo | last post by:
The war of the OSes was won a long time ago. Unix has always been, and will continue to be, the Server OS in the form of Linux. Microsoft struggled mightily to win that battle -- creating a...
27
1881
by: Greg Smith | last post by:
Hello, I have been given a programming task that falls into the "impossible" category with my current skill set. I am hoping somebody out there knows how to do this and can save my b-t. I...
3
2640
by: Brian Birtle | last post by:
**** A CHALLENGE TO THE GURUS - refute the statement "It's impossible to build a file upload progress meter using ASP.NET" **** First person to prove me wrong gets "All Time .NET Programming GOD"...
29
2284
by: Ancient_Hacker | last post by:
It sure would be nice if I could have a macro that add a level of indirection to its argument. So if I write: AddIndirection( X ) The macro AddIndirection will do: #define X (*X) ...
3
1700
by: Prometheum | last post by:
Having read over some of the disscussions involving incrementing variable names in C++, I have the impression that it's impossible. Is that true? I have a very definite need for them in the following...
8
3947
by: Sin Jeong-hun | last post by:
With Windows Forms application, just setting the opacity to 0.5 gave me a 50% opaque normal styled (with the title bar, familiar three buttons, borders and resizable) window. Did the same thing to...
0
7120
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6991
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6878
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7373
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
649
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
286
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.