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
K

kristmun

@kristmun
About
Posts
13
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • serial port + data receiving event
    K kristmun

    I think you have to set the RtsEnable flag. port.RtsEnable = true; try it out

    C# help question

  • String to Byte Array Conversion
    K kristmun

    I guess you could use the Encoding class (System.Text). Encoding encoding = Encoding.UTF8; byte[] b = encoding.GetBytes(s); But you have to use the right encoding. Hope this helps.

    C# data-structures help

  • Unmanaged in manage
    K kristmun

    I think that the cleanest way to access unmanaged functionality in .NET(c# or C++/CLI) is to write a wrapper in C++/CLI. There you will have an extra .dll, but you have bounded all unmanaged code within that .dll.

    Managed C++/CLI csharp c++ com discussion

  • Loading an assembly at runtime
    K kristmun

    Worked, thanks!

    .NET (Core and Framework) help database xml question

  • Loading an assembly at runtime
    K kristmun

    Hi, I´m trying to load an assembly at runtime with: ObjectHandle plugin = System.Activator.CreateInstanceFrom(@"C:\PathToDll\MyDll.dll", "PluginClass"); But this returns a strange error: Exception has been thrown by the target of an invocation. "The targetNamespace parameter 'MyDll' should be the same value as the targetNamespace 'urn:MyDll' of the schema." ok, where does a schema come into the picture? All help would be appreciated.

    .NET (Core and Framework) help database xml question

  • Value classes and structs
    K kristmun

    Hi guys, I was just wondering if it is possible to assign a value class direct to a unmanaged structure without assigning individual variables and vice versa? /krissi

    Managed C++/CLI question

  • Hi!!!
    K kristmun

    I think you should begin with finding out how message boards work. First thing is to find the right message board, in this case you are in the wrong one. This message board is only for C++/cli. Second thing is that you never ever ask someone to do your homework. With this said I think you should google a c tutorial or buy a book. Good luck.

    Managed C++/CLI com help learning

  • FTP programming using Winsock. Possible?
    K kristmun

    Just remember Andrew that you need at least two channels, one to issue the commands and one to transfer the data. Good luck! /krissi

    C / C++ / MFC c++ sysadmin help tutorial question

  • Conversion Issue [modified]
    K kristmun

    This one works for me Stings /krissi

    C / C++ / MFC help graphics

  • Copying data from unmanaged to managed
    K kristmun

    Hi guys, thanks for the advice. It works now using the Copy method array<unsigned char>^ value = {'a','b','c'}; char* ptr = new char[value->Length]; Marshal::Copy(value,0,(IntPtr)ptr,value->Length); and the other way around int length = 3; char str[] = {'d','e','f'}; char* pStr = &str[0]; array<unsigned char>^ strArr = gcnew array<unsigned char>(length); Marshal::Copy((IntPtr)pStr,strArr,0,length); I didn't quite get the value class way :sigh:

    Managed C++/CLI question

  • Copying data from unmanaged to managed
    K kristmun

    Hi, I am trying to copy data from a structure typedef struct OctetString { unsigned int length; unsigned char *value; } OctetString; I have only managed to copy the value using a for-loop and an ArrayList OctetString* data; ArrayList^ bits = gcnew ArrayList(); for(unsigned int i=0;i<data->length;i++) { bits->Add((char)*data->value); data->value++; } My question is: Is there a better way to copy the data into the ArrayList, and is there a more suitable structure than a ArryList to handle binary data of different lengths? /krissi

    Managed C++/CLI question

  • Accessing a List object in Mixed mode code.
    K kristmun

    Works like a charm! Thanks Mike

    Managed C++/CLI c++ help announcement

  • Accessing a List object in Mixed mode code.
    K kristmun

    Hi guys, here is my problem I have defined a list of managed objects in MyClass.h: class MyClass.h { public: MyClass(); gcroot<List<MessageListener^>^> messageListeners; } and using the list in the .cpp file MyClass::MyClass() { messageListeners = gcnew List<MessageListener^>(); } void MyClass::addMessageListener(u_short id,u_short version) { MessageListener^ msgl = gcnew MessageListener(id,version); messageListeners->Add(msgl); } ...as you can see I'm trying to use a list of managed objects in an unmanaged class. My problem is than I can't access the objects in the list void MyClass::findMessageListener(u_short id,u_short version) { for(int i = 0;iCount;i++) { MessageListener^ msg = messageListeners[i]; if(msg->id == id && msg->version == version) { return msg; } } return nullptr; } I would like to have some comments on how this can be done. Thx

    Managed C++/CLI c++ help announcement
  • Login

  • Don't have an account? Register

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