Click here to Skip to main content
15,500,884 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Serial Port BytesToRead always 0 Pin
cibec75455@frnla.com21-May-21 2:47
Membercibec75455@frnla.com21-May-21 2:47 
QuestionHow to call System::Windows::Forms::Controls "invoke" method? Pin
Member 1515077819-May-21 20:48
MemberMember 1515077819-May-21 20:48 
AnswerRe: How to call System::Windows::Forms::Controls "invoke" method? Pin
Victor Nijegorodov19-May-21 21:28
MemberVictor Nijegorodov19-May-21 21:28 
GeneralRe: How to call System::Windows::Forms::Controls "invoke" method? Pin
Member 1515077819-May-21 21:35
MemberMember 1515077819-May-21 21:35 
GeneralRe: How to call System::Windows::Forms::Controls "invoke" method? Pin
Richard MacCutchan19-May-21 22:09
mveRichard MacCutchan19-May-21 22:09 
GeneralRe: How to call System::Windows::Forms::Controls "invoke" method? Pin
Member 1515077819-May-21 22:20
MemberMember 1515077819-May-21 22:20 
QuestionWhat is a preferable approach to develop a common class that handles multiple identical groupbox? Pin
Member 1515077818-May-21 1:41
MemberMember 1515077818-May-21 1:41 
QuestionHow to convert array<System::Byte^>^ to array<unsigned char>^ Pin
Member 1515077812-May-21 19:19
MemberMember 1515077812-May-21 19:19 
I have an pointer to an array of System::Byte pointers, and im trying to use the SerialPort.Write function that only accepts
array<unsigned char>^


It is necessary that I used System::Byte pointers because the value of byte array needs to be update from time to time during runtime.


heres my sample code
System::Void MyForm::button1_Click(System::Object^ sender, System::EventArgs^ e)
{

    array<System::Byte^>^ myArray = gcnew array<System::Byte^>(10U);
    myArray[0] = (System::Byte) 0x01;
    myArray[1] = (System::Byte) 0x02;
    myArray[2] = (System::Byte) 0x03;
    myArray[3] = (System::Byte) 0x04;
    myArray[4] = (System::Byte) 0x05;
    myArray[5] = (System::Byte) 0x06;
    myArray[6] = (System::Byte) 0x07;
    myArray[7] = (System::Byte) 0x08;
    myArray[8] = (System::Byte) 0x09;
    myArray[9] = (System::Byte) 0x10;
    SerialPort1->Write(myArray,0,10U);/*ERROR,E0304  no instance of overloaded function "System::IO::Ports::SerialPort::Write" matches the argument list; argument types are: (cli::array<System::Byte ^, 1> ^, int, unsigned int)*/
        object type is: System::IO::Ports::SerialPort ^

}


modified 13-May-21 0:27am.

QuestionRe: How to convert array<System::Byte^>^ to array<unsigned char>^ Pin
Richard MacCutchan12-May-21 22:05
mveRichard MacCutchan12-May-21 22:05 
AnswerRe: How to convert array<System::Byte^>^ to array<unsigned char>^ Pin
Member 1515077817-May-21 1:06
MemberMember 1515077817-May-21 1:06 
QuestionHow to implement a global variable if C++/CLI doesn't support it at all? Pin
Member 1515077812-May-21 0:29
MemberMember 1515077812-May-21 0:29 
AnswerRe: How to implement a global variable if C++/CLI doesn't support it at all? Pin
Richard MacCutchan12-May-21 0:47
mveRichard MacCutchan12-May-21 0:47 
GeneralRe: How to implement a global variable if C++/CLI doesn't support it at all? Pin
Member 1515077812-May-21 19:30
MemberMember 1515077812-May-21 19:30 
Questioncpp Pin
likith adithya22-Feb-21 0:39
Memberlikith adithya22-Feb-21 0:39 
QuestionRe: cpp Pin
Richard MacCutchan22-Feb-21 0:40
mveRichard MacCutchan22-Feb-21 0:40 
AnswerRe: cpp Pin
Richard Deeming22-Feb-21 1:34
mveRichard Deeming22-Feb-21 1:34 
QuestionSee if print queue is empty Pin
Erich Ruth17-Feb-21 7:25
MemberErich Ruth17-Feb-21 7:25 
AnswerRe: See if print queue is empty Pin
Richard MacCutchan17-Feb-21 22:29
mveRichard MacCutchan17-Feb-21 22:29 
QuestionCompiling a shared library Pin
Member 1504770716-Jan-21 6:57
MemberMember 1504770716-Jan-21 6:57 
AnswerRe: Compiling a shared library Pin
Gerry Schmitz17-Jan-21 4:09
mveGerry Schmitz17-Jan-21 4:09 
GeneralRe: Compiling a shared library Pin
Member 1504770718-Jan-21 4:52
MemberMember 1504770718-Jan-21 4:52 
GeneralRe: Compiling a shared library Pin
Gerry Schmitz18-Jan-21 6:40
mveGerry Schmitz18-Jan-21 6:40 
Question.NET 5? Pin
John Schroedl5-Jan-21 5:13
professionalJohn Schroedl5-Jan-21 5:13 
AnswerRe: .NET 5? Pin
Richard Andrew x6418-Jan-21 13:03
professionalRichard Andrew x6418-Jan-21 13:03 
GeneralRe: .NET 5? Pin
John Schroedl19-Jan-21 3:39
professionalJohn Schroedl19-Jan-21 3:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.