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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
S

shezh

@shezh
About
Posts
16
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Tree View Control
    S shezh

    Hi, I had to do a similar thing on the project i'm working on, but instead of using a DB, I just wrote the 'structure' of the tree to an XML file. The top-level elements represented parent tree nodes, and any child nodes of the parent nodes were written as child elements. You could then just parse the XML file, creating TreeNodes as you go through the different XML elements. Of course it depends on how much information you need to store. For me, all I really needed was the text of the nodes and the hierarchal structure. I hope this helps buddy! cheeze

    Managed C++/CLI database tutorial data-structures

  • dynamically loading an unmanaged dll
    S shezh

    Hi, I'm trying to dynamically load an unmanaged dll and call a function within it from a managed C++ app. I've managed to do this in an unmanaged C++ app, using calls to LoadLibrary and GetProcAdddress, but don't know what to do in the .NET version. I know there's P/Invoke, but with that the library has to be declared at compile-time, and I won't know the (unmanaged) library until run-time. So i guess the question is how can I use the LoadLibrary and GetProcAddress functions in managed C++ (again not using P/Invoke, as the library won't be known until run-time)? Thanks for your help Cheeze

    Managed C++/CLI question csharp c++ help announcement

  • Interop exception
    S shezh

    Thanks for your help guys, Sorry S Pandian, I should've been clearer - I am actually able to use the COM object fine, only when I tried accessing it in another thread did I have this problem. Mike, I think you hit the nail on the head! I was creating the object in another thread, and then trying to access it later on, once that thread had exited. But without using another thread, everything works fine. Cheers guys, Shehzad

    .NET (Core and Framework) com csharp question discussion

  • Interop exception
    S shezh

    Hi All, I'm accessing a COM object from my .NET application, but I keep on getting the following exception: "COM object that has been separated from its underlying RCW can not be used" Does anyone know how this exception can come about? I'd appreciate any thoughts, thanks. Shehzad

    .NET (Core and Framework) com csharp question discussion

  • DCOM server in C#
    S shezh

    Hello everyone, I need to write a DCOM server object in C#. Is this possible? Can I just write a C# Remoting object and then expose this as a COM object, or will this not work because the object needs to be accessed remotely? Any help would be greatly appreciated! Thanks, Shehzad

    C# csharp com sysadmin help question

  • Problem using COM dll
    S shezh

    blockquote class="FQ">

    Judah Himango wrote:

    As far as the error, there's no way that we can know. Can you show us the function signature (both native COM and .NET wrapper) for that function that's causing the error? Sure: in 'original COM dll' (shown in VB6): Public Sub ConnectProjectEx(_ByVal DomainName As String,_ByVal ProjectName As String,_ByVal UserName As String,_ByVal UserName As String,_Optional ByVal Password As String = " "_) and in the interop wrapper (using ildasm): .method public hidebysig newslot virtual instance void ConnectProjectEx([in] string marshal( bstr) DomainName, [in] string marshal( bstr) ProjectName, [in] string marshal( bstr) UserName, [in][opt] string marshal( bstr) Password) runtime managed internalcall When I pass to this function an invalid username or password, it actually throws an exception, saying 'The user so and so does not exist'. However, when I give it a correct user, it throws the application error I mentioned before - it seems that it gets further in the dll function, and then fails, and since I can't see the actual code in the COM dll (since it's third party), I don't know what to do! Thanks for your help. Shehzad

    C# help csharp com visual-studio performance

  • Problem using COM dll
    S shezh

    Hello, I'm using a third party COM dll, which I've referenced in my C# project. However, when I call a certain function in it, it throws an error message saying "The instruction at 0x10153c89 referenced memory at 0x0751629c. The memory could not be 'read'" and then the application terminates. Is this most likely to be an error in the COM dll, or does anyone else have any other ideas on what the problem may be? When Visual Studio generates the interop assembly for the COM dll and places it in your build output directory, how does it 'route' the function calls to the actual COM dll it wraps, or is this information contained within the interop assembly itself? Thanks for your time and help Shehzad

    C# help csharp com visual-studio performance

  • accessing VB6 exe functions in C#
    S shezh

    Hello all, Does anyone know of any way of calling functions in a VB6 exe, from code in C#? Is this even possble? I don't know much (if anything!) about VB6 so I'm a bit confused. I've managed to call functions in a VB6 dll, but is the same thing possible with exe's too? As always, any help at all would be greatly appreciated! Thanks Shehzad

    C# csharp help question

  • registering a dll at runtime
    S shezh

    Hi, Is there any way to register a COM dll at run-time, from the code, for example by a certain win32 API call? Thanks for the help! Shehzad

    C# com json help tutorial question

  • late binding to VB6 dlls
    S shezh

    Hi, Could someone please tell me what is the best way to late bind to COM dlls? I'm basically developing an application that loads specified dlls and then runs certain functions contained in those dlls. The problem is that I don't know the libraries to load until runtime, so I can't really use tlbimp. I know it is possible to use tlbimp at runtime (using TypeLibConverter) but this creates new names for the functions in the dll, so it may not be such a good idea... Any help would be greatly appreciated, thanks! Shehzad

    C# help question wpf wcf

  • working with strings
    S shezh

    Thanks a lot for your help guys, your advice seems to have done the trick!! Thank you!:-D

    C# json help question

  • working with strings
    S shezh

    Hi, I'm starting a process with ProcessStartInfo, setting the 'Arguments' property to a filepath to the file I want to start the process with. However, the process I start is complaining about the filepath - since the filepath has spaces in it, it only seems to pass to the process the filepath upto the first space, and then ignores the rest. The process I'm trying to start is regsvr32.exe and the argument is a filepath to a dll I want to register. Could anyone please help me? Thanks a lot, Shehzad

    C# json help question

  • VB6 dlls in C#
    S shezh

    Is there anyway to do this at runtime?

    C# question csharp com help

  • VB6 dlls in C#
    S shezh

    Hi, Just one quick question: Do you have to register COM DLLs first using regsvr32 before you can create any instances of classes in the COM DLL? If so, is there anyway around this? Any help would be much appreciated! Thanks!

    C# question csharp com help

  • DllImport call unmanaged code
    S shezh

    I had a similar function that returned a string from a C++ dll. Try declaring a global char array in your dll and then copy the string into the array, as below: // global char array char szReturn[MAX_PATH]; BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { return TRUE; } __declspec(dllexport) LPCTSTR Test() { lstrcpy(szReturn,"success!"); return szReturn; } Hope that helps ;)

    C# help csharp c++ question

  • importing an exe as an assembly
    S shezh

    Hi, I'm trying to access functions residing in a VB6 exe. Does anyone know of a way to access these functions in C#.NET? Thanks, Shehzad

    C# csharp 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