OleCreatePropertyFrame 
Author Message
 OleCreatePropertyFrame

I am trying to call OleCreatePropertyFrame to display the
properties for a video source plugin in for
WindowsMediaEncoder. As this is located in olepro32.dll I
attempted to declare the method as being declared in an
external dll using the [DllImport(<name>)] attribute to
the method declaration. The problem is the type
conversion of the method parameters, which I do not think
I got correctly. I can call the method and the runtime
does not complain, but on the otherhand it does not do a
darn thing.

If someone that knows this better than me could take a
look at it, and tell me what is wrong I would appreciate
it. The method declaration I came up with looks as
follows.

[DllImport("olepro32.dll")]
                public static extern int
OleCreatePropertyFrame(
        IntPtr   parentWindow,                  
        uint   xPos,                                    
        uint   yPos,                                    
        string captionText,                            
        ulong  numObjects,                              
        object plugins,                                
        ulong  numPages,                                
        Guid[] clsidArray,                              
        int    locale,                                  
        uint   reserved1,
        object reserved2);

THANKS!

/CMH



Sun, 04 Jul 2004 02:34:59 GMT  
 OleCreatePropertyFrame
Chris,

    The definition for OleCreatePropertyFrame should be as follows:

[DllImport("olepro32.dll")]
public static extern int OleCreatePropertyFrame(
    IntPtr hwndOwner,
    [MarshalAs(UnmanagedType.U4)] x,
    [MarshalAs(UnmanagedType.U4)] y,
    [MarshalAs(UnmanagedType.LPWStr)] lpszCaption,
    [MarshalAs(UnmanagedType.U4)] cObjects,
    [MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.IUnknown)]
object[] lplpUnk,
    [MarshalAs(UnmanagedType.U4)] cPages,
    [MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.Struct)]
Guid[] lpPageClsID,
    Guid lcid,
    [MarshalAs(UnmanagedType.U4)] dwReserved,
    IntPtr lpvReserved);

    As for nothing coming up when you call the function, what are the
parameters you are passing in?

--
                              - Nicholas Paldino [.NET MVP]


Quote:
> I am trying to call OleCreatePropertyFrame to display the
> properties for a video source plugin in for
> WindowsMediaEncoder. As this is located in olepro32.dll I
> attempted to declare the method as being declared in an
> external dll using the [DllImport(<name>)] attribute to
> the method declaration. The problem is the type
> conversion of the method parameters, which I do not think
> I got correctly. I can call the method and the runtime
> does not complain, but on the otherhand it does not do a
> darn thing.

> If someone that knows this better than me could take a
> look at it, and tell me what is wrong I would appreciate
> it. The method declaration I came up with looks as
> follows.

> [DllImport("olepro32.dll")]
> public static extern int
> OleCreatePropertyFrame(
>         IntPtr   parentWindow,
>         uint   xPos,
> uint   yPos,
> string captionText,
> ulong  numObjects,
> object plugins,
> ulong  numPages,
> Guid[] clsidArray,
> int    locale,
> uint   reserved1,
> object reserved2);

> THANKS!

> /CMH



Sun, 04 Jul 2004 03:33:33 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. OleCreatePropertyFrame()

2. OleCreatePropertyFrame() Fails with 80004005

3. OleCreatePropertyFrame

4. How to change the whole title (caption) of a PropertyFrame created with OleCreatePropertyFrame

5. How can I set a PropertyFrame created with OleCreatePropertyFrame always on top of the z-order

6. OleCreatePropertyFrame function, help needed

7. OleCreatePropertyFrame() fails to create propertysheet, help!

8. BUG in OleCreatePropertyFrame API: No way to trap OK or Cancel

9. OleCreatePropertyFrame(...)

10. Why OleCreatePropertyFrame() fails in test computer but OK in development computer?

 

 
Powered by phpBB® Forum Software