Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

dragooooon lee

@dragooooon lee
About
Posts
12
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • --------anti-copy problem
    D dragooooon lee

    I want my doc file to be only read from an authorized computer or from local network, and prevent others copy my doc file. Is that possible?:-> Vincent

    C / C++ / MFC sysadmin help question

  • ---how to lock two mutexes simultaneously in atomic mode?
    D dragooooon lee

    hi ,Ryan and Rilhas the context is producer/consumer thread1 ---------------------------------------------- p(empty) mutexRW.lock() produce(item) mutexRW.unlock() v(full) ----------------------------------------------------- thread2 ---------------------------------------------- p(full) mutexRW.lock() comsume(item) mutexRW.unlock() v(empty) ----------------------------------------------------- I need to stop thread1 and thread2 sinultaneously in thread3 to avoid deadlock at p(empty) in thread1 for buffer is full or deadlock at p(full) in thread2 for buffer is empty. and I can't use a third mutex to achieve that because a third mutex would be unefficient for producer/consumer. so give me some clues to solve this problem please. thanks :confused: Vincent -- modified at 12:48 Tuesday 2nd May, 2006

    C / C++ / MFC tutorial question

  • ---how to lock two mutexes simultaneously in atomic mode?
    D dragooooon lee

    mutex1 in thread 1 mutex2 in thread 2 how to lock the two mutexes simultaneously in thread 3?:confused: Vincent

    C / C++ / MFC tutorial question

  • ----how can I recieve a custom message sent from COM server to C# client?
    D dragooooon lee

    ---how can I recieve a custom message sent from COM server to C# client? if I send a message in the range 0 to WM_USER-1, it works. but fail when I send a message above WM_USER? can someone solve this problem for me? thank you very much! Vincent

    C# question csharp com sysadmin help

  • ????How to return a self-defined type pointer from COM object
    D dragooooon lee

    hi,all I want a self-defined type pointer to be returned from my COM object to C#. and then use the pointer to initialize another COM.how should I do? regards Vincent -- modified at 2:41 Wednesday 29th March, 2006

    C# csharp com tutorial question

  • @^@ how to handle a pointer returned by a COM interface
    D dragooooon lee

    It's ugly since it's just a test. Thanks anyway.Maybe I need to read some books about interoperation to figure it out:rolleyes: Vincent

    C# csharp com tutorial question

  • @^@ how to handle a pointer returned by a COM interface
    D dragooooon lee

    it's ugly since it's just a test. thanks anyway.maybe I need to read some books about interoperation to figure it out.:sigh: Vincent

    C# csharp com tutorial question

  • @^@ how to handle a pointer returned by a COM interface
    D dragooooon lee

    import "oaidl.idl"; import "ocidl.idl"; [ object, uuid(853b4626-393a-44df-b13e-64cabe535dbf), nonextensible, pointer_default(unique) ] interface IMyComponent : IUnknown { [id(1), helpstring("method Initialize")] void * __stdcall Print(BSTR msg); }; [uuid(0c6bb614-8563-49ea-b5ce-e6b7febebc27)] coclass RtpSource { interface IMyComponent ; }; ------------------------------------------------------------ C# code IntPtr p = ((IMyComponent)rtpsource).Print(s); StringBuilder sb = new StringBuilder(); sb.Append(Marshal.PtrToStringBSTR(p)); Vincent

    C# csharp com tutorial question

  • @^@ how to handle a pointer returned by a COM interface
    D dragooooon lee

    import "oaidl.idl"; import "ocidl.idl"; [ object, uuid(853b4626-393a-44df-b13e-64cabe535dbf), nonextensible, pointer_default(unique) ] interface IMyComponent : IUnknown { [id(1), helpstring("method Initialize")] void * __stdcall Print(BSTR msg); }; [uuid(0c6bb614-8563-49ea-b5ce-e6b7febebc27)] coclass RtpSource { interface IMyComponent ; }; Vincent

    C# csharp com tutorial question

  • @^@ how to handle a pointer returned by a COM interface
    D dragooooon lee

    System.AccessViolationException caught when I use CoTaskMemAlloc():(( Vincent

    C# csharp com tutorial question

  • @^@ how to handle a pointer returned by a COM interface
    D dragooooon lee

    hi,Jared my COM was built in pure unmanaged code.I can't use AllocCoTaskMem,can I? Vincent

    C# csharp com tutorial question

  • @^@ how to handle a pointer returned by a COM interface
    D dragooooon lee

    assume the following method in a COM virtual void * __stdcall Print(BSTR msg){ char * buf= new char[128]; sprintf(buf,"return by print interface"); return (void *)buf; } how should I handle the returned pointer by the method above in C#, so that I can get the proper string set by the method? :laugh: Vincent

    C# csharp com tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups