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
M

my Nick

@my Nick
About
Posts
6
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Info File vs. Hardlink
    M my Nick

    JunctionPoint deals with Directory. My need is file symlink, espec HardLink, which means that the link resides on the same volume as the target but in another Directory.

    C# visual-studio help tutorial question

  • Info File vs. Hardlink
    M my Nick

    Hi. All i want to do is something like

    ...
    foreach (string f in Directory.GetFiles(@"X:\someDir"))
    {
    Console.Write(f);
    if (IsHardlink(f) == false) Console.WriteLine(" is real fileentry");
    else Console.WriteLine(" is hardlink and the target is " + GetTargetName(f));
    }
    ...
    private bool IsHardLink(string filePath)
    {
    ???
    }
    private string GetTargetName(string filePath)
    {
    ???
    }

    I 'googled' for days, found tons of articles 'how to create hardlinks, junctions' etc, also many examples for 'get the linkcount of a given file" (the target), but nothing for my need. Please help, give me advice, point me in a direction. Thank you

    C# visual-studio help tutorial question

  • C++ DLL within C# application
    M my Nick

    Thank you very much, John. I will see and try ...

    C# help csharp sqlite c++ php

  • C++ DLL within C# application
    M my Nick

    Thank you for participating in my question. Of course, you ALL are right with the (ab)use of SQLite for such a task. But there are in the market some providers of such scenarios, unfortunately, to pay what separates for my hobby. Therefore I've decided for this supplier, which is for free. Please, let's go away from the theme SQLite, at all from the theme database. My original question was how to reconstruct the functionality of a language (C++) in another language (C#). To use a DLL with embedded class ... Is there even any further help? Thank you.

    C# help csharp sqlite c++ php

  • C++ DLL within C# application
    M my Nick

    Thank you for answering. My intention is a Server/Client solution, where the Server is on another remote machine than the Client. IMHO the System.Data.SQLite does not support this. Or am I totaly wrong with the mentioned dll?

    C# help csharp sqlite c++ php

  • C++ DLL within C# application
    M my Nick

    Hello, dear forum. I have a problem programming on C#. My recent activities with C++ are back over 20 years. I downloaded from the internet a server/client-solution for SQLite and am stuck in my C#-application using this dll.

    HRESULT hr;
    HMODULE hMod = NULL;
    PDLLGETCLASSOBJECT proc = NULL;
    IClassFactory\* pFactory = NULL;
    
    //Get the module from list or load it
    hMod = GetModule( szDllPath );
    if( !hMod ) return( false );
    
    //Get Proc address
    proc = (PDLLGETCLASSOBJECT) GetProcAddress( hMod, "DllGetClassObject" );
    if( !proc ) return( false );
    
    hr = proc( IInterface , IID\_IClassFactory , (void\*\*)&Factory );
    if( hr || !pFactory ) return( false );
    
    hr = pFactory->CreateInstance( NULL, IInterface , pInterface );
    if( hr || !pInterface ) return( false );
    
    pFactory->Release();
    

    What I've done so far (not much):

    \[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode\]
    private static extern IntPtr LoadLibrary(String lpFileName);
    
    \[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true)\]
    private static extern IntPtr GetProcAddress(IntPtr hModule, String procName);
    
    \[DllImport("kernel32.dll", SetLastError = true)\]
    \[return: MarshalAs(UnmanagedType.Bool)\]
    private static extern Boolean FreeLibrary(IntPtr hModule);
    
    ...
    
    private static String DLLFile = string.Empty;
    private static IntPtr handleDLL = IntPtr.Zero;
    private static IntPtr handleProc = IntPtr.Zero;
    
    ...
    
    DLLFile = MyPath + @"Lib\\SQLQueryAS.dll";
    handleDLL = LoadLibrary(DLLFile);
    if (handleDLL == IntPtr.Zero) throw new Win32Exception(Marshal.GetLastWin32Error());
    
    handleProc = GetProcAddress(handleDLL, "DllGetClassObject");
    if (handleProc == IntPtr.Zero) throw new Win32Exception(Marshal.GetLastWin32Error());
    
    ???
    and now
    ???
    

    Then (unless I have understood correctly) it should invite a class, so you can responsive in this class located methods (procs/functions). Please help me. What should happen next? Thank you in advance.

    C# help csharp sqlite c++ php
  • Login

  • Don't have an account? Register

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