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
G

GerhardKreuzer

@GerhardKreuzer
About
Posts
11
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Export a 'long' from unmanaged code into .net
    G GerhardKreuzer

    Hi, lastly I found a working solution and its far from zipping data, thanks for that really good idea, but it was not April 1st, (and gives insight into your mindset). The embedded framework didn't support passing 64 bit values between managed and unmanaged code. A little workaround is needed. Fist create a new IntPnt object and pass this object to unmanged code by reference as parameter of some function. In unmanaged code use this pointer as any other pointer in C/C++, and assign the data you need. Return from this unmanaged function and use the 'Marshal' class to readout the value. Use a 'try finally' block to clean up memory in any case. Managed code:

    Private Shared Function ReadFilePointer() As Long
    Dim ptr As IntPtr = Marshal.AllocHGlobal(Len(New Long()))
    Try
    GetBookmark(ptr)
    Return Marshal.ReadInt64(ptr)
    Finally
    Marshal.FreeHGlobal(ptr)
    End Try
    End Function

    Unmanaged code:

    extern "C" { __declspec(dllexport) void GetBookmark (intptr_t*); }

    void GetBookmark(intptr_t* bmark)
    {
    *bmark = ftell(outFile);
    }

    Hope this can help someone someday. With best regards Gerhard

    The Lounge question csharp css

  • Export a 'long' from unmanaged code into .net
    G GerhardKreuzer

    Hi, I have to export a 'long' value from an unmanaged dll to a VB app. I do this with other data types like int and bool, works fine, so I more or less know how do do it. When I do the same with 'long' the call crashes. Where there any samples out? What is so special with 'long'? Thanks for helping. With best regards Gerhard

    extern "C" { __declspec(dllexport) long GetCurrentFileRawFilePointer (void); }
    extern "C" { __declspec(dllexport) int AwaitCycleDoneFor (uint); }
    extern "C" { __declspec(dllexport) bool isDataLinkClear (void); }

    First line fails, other worked fine.

    Declare Function GetCurrentFileRawFilePointer Lib "GeoMon4D_iMX7.dll" () As Long
    Declare Function AwaitCycleDoneFor Lib "GeoMon4D_iMX7.dll" (timeout_ms As UInteger) As Integer
    Declare Function isDataLinkClear Lib "GeoMon4D_iMX7.dll" () As Boolean

    The Lounge question csharp css

  • WPF & Toolbox in VS2008
    G GerhardKreuzer

    Hi proganon, no, there is a hot fix available, please read the older conversation items, and after applying this fix, the toolbox works fine. With best regards Gerhard

    WPF

  • WPF & Toolbox in VS2008
    G GerhardKreuzer

    Thanks Pete, this hotfix is really hot, it works now!!!! I get a dialog, which informs me, that Microsoft.Ink.dll and Microsoft.ReportingServices.Interfaces.dll is missing for what reason ever, but it works in principle. I found my controls and I placed one of them on an other, no problems. So I can try to fix the two dll's in a very relaxed scenario. Thanks a lot. Gerhard ( :-D )

    WPF

  • WPF & Toolbox in VS2008
    G GerhardKreuzer

    Sorry, the VS exits with sudden death. No chance. But, after checking the TaskManager I found devenv still running and as I want to reboot the machine, I get a system dialog telling me, that I have to close some open dialogs first. It looks like, that a dialog should open but doesnt for what reason ever and ..... Ok, will check the event log, and dont guess SP1 is the problem. Thanks Gerhard

    WPF

  • WPF & Toolbox in VS2008
    G GerhardKreuzer

    No, good hint, will do soon. Ok, thanks for the description, I knew now, what dialog I expect to see next. I dont do this in WPF, so I dont know what should come next. Maybe ist an issue after installing der SP1. I will step back and try to do it with WinForms again, maybe its more general. I stopped developing WinForms, si I dont know the very last state exactly. Hope I can go further. Thanks again Gerhard

    WPF

  • WPF & Toolbox in VS2008
    G GerhardKreuzer

    Hi, I just need to create a UserControl, combining two standard controls and add this new one to the ToolBox. I often do this in the WinForms world without any problem, but in WPF-land???? Just as I had created a new Tab in the toolbox and starting to use 'Choose items' my VS2008 immediately closes down without any message. This behavior is best described by the term 'sudden death'. I try this not only once and I try this at a fresh booted machine, doesnt work. No way out. Any workaround? Or is this the wrong way to do things in WPF-land? Thanks for helping Gerhard (:confused:)

    WPF

  • WPF, XPS, Printing
    G GerhardKreuzer

    Hi, is there any body out, who have advantages with XPS-paper, XPS-printing path, samples or other material? THANKS Gerhard

    .NET (Core and Framework) csharp wpf question

  • Control a Scanner with VB.net
    G GerhardKreuzer

    Hi, I need control over a standard TWAIN scanner out of my application, StartScan and some settings, color/sw, resolution ... Have anybody experience or some idea Thanks -- modified at 18:51 Wednesday 18th January, 2006

    Visual Basic csharp

  • Code Generator
    G GerhardKreuzer

    Hi, did anybody have comments on code generators for n-tier apps, like Deklarit, TierDeveloper, VBExpress, CodeSmith, Neo ..... Thanks for answers

    Article Writing

  • WSE 2.0 Operation Timed out
    G GerhardKreuzer

    I try to do the first steps on WSE 2.0. First I try the QuickStart Samples, which works. I rewrite the samples to give them a WinForm UI, works. But as I start with new projects, I get the 'Operation Timed Out' message whatever I try. I also try to build in some errors in the original code to get the message too, but I never get it. I am out of ideas new, maybe one could help. I have prepared a zip of my project for all interested helpers. THANKS Gerhard

    .NET (Core and Framework) design help
  • Login

  • Don't have an account? Register

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