Remko Weijnen's Blog (Remko's Blog)

About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like

Archive for the ‘C++’ Category

Returning a string from unmanaged dll to .net

I write most of my code in unmanaged languages such as Delphi and C/C++. Sometimes customers ask me to interface my code to their .net code in which case I create a dll for them.

A recurring thing is that I need to return string to .net.

There are many ways to do this of course but in all cases we need to manage memory: who will allocate the memory for the string and who is responsible for freeing it?

(more…)

  • 3 Comments
  • Filed under: .NET, C#, C++, Delphi
  • NTVDM encountered a hard error

    MS-Dos LogoToday I troubleshooted an old DOS application that needed to run on a 32 bit Citrix XenApp Server. The last time I saw an actual DOS application in a production environment must be years ago.

    When starting the application, the WOW subsystem (NTVDM) crashed with the message: “NTVM encountered a hard error.”:

    NTVDM encoutered a hard error

    After spending some time troubleshooting I remembered a similar issue from a few years ago where a DOS application worked fine from the Console but refused to work from an RDP or ICA session.

    (more…)

    Donate


    Blogroll


    Categories


    Archives