I am trying to wrap IOleContainer and having trouble getting the ENumObjects
declaration correct.
This is what I have so far:
[ComImport,
Guid("0000011B-0000-0000-C000-000000000046"),
InterfaceTypeAttribute(ComInterfaceType.InterfaceI sIUnknown)]
public interface IOleContainer
{
void ParseDisplayName(
[In, MarshalAs(UnmanagedType.Interface)] object pbc,
[In, MarshalAs(UnmanagedType.BStr)] string pszDisplayName,
[Out, MarshalAs(UnmanagedType.LPArray)] int[] pchEaten,
[Out, MarshalAs(UnmanagedType.LPArray)] object[] ppmkOut);
void EnumObjects([In, MarshalAs(UnmanagedType.U4)] int grfFlags,
[Out, MarshalAs(UnmanagedType.LPArray)] object[] ppenum);
void LockContainer([In, MarshalAs(UnmanagedType.I4)] int fLock);
}
Any suggestions? 1 2410
Sheldon,
When you come across IEnumUnknown, that is an interface pointer that is
being returned, so you need to actually declare that interface type, and
then pass it by ref (with the ref keyword), or, you can always pass an
IntPtr by ref (and ignore it).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"sheldon woloshyn" <sh******@accesswave.ca> wrote in message
news:ea**************@TK2MSFTNGP09.phx.gbl... I am trying to wrap IOleContainer and having trouble getting the ENumObjects declaration correct. This is what I have so far:
[ComImport, Guid("0000011B-0000-0000-C000-000000000046"), InterfaceTypeAttribute(ComInterfaceType.InterfaceI sIUnknown)] public interface IOleContainer { void ParseDisplayName( [In, MarshalAs(UnmanagedType.Interface)] object pbc, [In, MarshalAs(UnmanagedType.BStr)] string pszDisplayName, [Out, MarshalAs(UnmanagedType.LPArray)] int[] pchEaten, [Out, MarshalAs(UnmanagedType.LPArray)] object[] ppmkOut); void EnumObjects([In, MarshalAs(UnmanagedType.U4)] int grfFlags, [Out, MarshalAs(UnmanagedType.LPArray)] object[] ppenum); void LockContainer([In, MarshalAs(UnmanagedType.I4)] int fLock); }
Any suggestions? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: yawnmoth |
last post by:
word wrapping normally treats some spaces as line feeds, if there
hasn't been a line feed for quite a while. so while a string with
eighty consecutive a's might not word wrap, a space placed...
|
by: David Cleaver |
last post by:
Hello all,
I was wondering if there were some sort of limitations on the "if"
statement? I'm writing a program which needs to check a bunch of
conditions all at the same time (basically). And...
|
by: Nathan |
last post by:
I am trying to prevent a horizontal list from wrapping. Each list item
is floated with "float: left".
Currently I use an ugly hack. I set the width of the list to a large
number which is...
|
by: phl |
last post by:
hi,
My question is:
1. To avoid possible memory leaks, when you use this pattern, after you
have dealth with the unmanaged resources and before you take your
object off the finalize queue,...
|
by: m.banaouas |
last post by:
Hello Pythoneers:
I would like to ask you a simple question:
Are you satisfied by SOAPpy module?
Actually, I use this module since a year and i immediately found it very
well-implemented,...
|
by: Andy |
last post by:
Hey all,
I have a question about CheckboxList control wrapping.
I have a 2 column .net CheckboxList control that renders in a narrow place
on my page. Because I don't have a lot of horizontal...
|
by: Abubakar |
last post by:
Hi all,
I downloaded a code (a c++ project) over the internet and at one place I saw
the following lline:
// allow usage as a pointer.
operator CMemDC*() { return this; }
(the comment up...
|
by: martymix |
last post by:
simple question:
I have a simple <dt>test text</dt>
I get the innerHTML of that dt, and I try and append some text to it
like so:
dt = document.getElementsByTagName('dt')
var text =...
|
by: rebeccatre |
last post by:
hi can Variant archiving setTimout('.. capability be done without
using it? :-)
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |