User Profile

Collapse

Profile Sidebar

Collapse
apaka
apaka
Last Activity: Aug 28 '11, 09:14 AM
Joined: Feb 17 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • apaka
    started a topic How to pin a pointer to managed object in C#?
    in .NET

    How to pin a pointer to managed object in C#?

    Unmanaged code calls my functions. In first function I sould pass back pointer to my managet object. Sometimes later some of my othrer functions got called with that same pointer as one of parameters . I sould dereference it use it to perform some calculations and then if it is not neaded dispose of it.
    To cut the story short I need to pin that object so that GC won't move it til I dispose of it. How to do that in C# ?
    ...
    See more | Go to post

  • apaka
    replied to How can I get HandleRef of some C# Object?
    Maybe you shoud use Marshal.SizeOf( typeof(obj))
    See more | Go to post

    Leave a comment:


  • apaka
    replied to How can I get HandleRef of some C# Object?
    [ComVisibleAttri bute(true)]
    public static void StructureToPtr(
    Object structure,
    IntPtr ptr,
    bool fDeleteOld
    )
    Parameters
    structure
    Type: System.Object
    A managed object holding the data to be marshaled.
    This object must be an instance of a formatted class.
    ptr
    Type: System.IntPtr
    A pointer to an unmanaged block of memory, which
    must be allocated before...
    See more | Go to post

    Leave a comment:


  • apaka
    started a topic Thumbnail shell extension .NET

    Thumbnail shell extension .NET

    Does anybody know a working sample how to write thumbnail shell extension that works on XP, or give me a clue how to implement IExtractImage2 interface and requied structs? Thanks in advance.
    See more | Go to post
No activity results to display
Show More
Working...