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

Managed C++/CLI

 
GeneralRe: help Pin
Anders Molin20-Dec-02 12:06
professionalAnders Molin20-Dec-02 12:06 
GeneralConvertiong Managed Strings to Unmanaged Chars Pin
KBL14-Dec-02 18:37
KBL14-Dec-02 18:37 
GeneralRe: Convertiong Managed Strings to Unmanaged Chars Pin
Nish Nishant17-Dec-02 14:48
sitebuilderNish Nishant17-Dec-02 14:48 
GeneralConverting and Concatenating Strings Pin
KBL13-Dec-02 22:01
KBL13-Dec-02 22:01 
GeneralRe: Converting and Concatenating Strings Pin
Jeff J14-Dec-02 7:12
Jeff J14-Dec-02 7:12 
GeneralWindows Forms Open File Dialog Pin
KBL13-Dec-02 6:46
KBL13-Dec-02 6:46 
GeneralRe: Windows Forms Open File Dialog Pin
Nish Nishant17-Dec-02 14:50
sitebuilderNish Nishant17-Dec-02 14:50 
GeneralLooping sending me loopy! Pin
dyerstein13-Dec-02 3:04
dyerstein13-Dec-02 3:04 
Visual Studio 6
** loads a string of "len" byte in message at the given index
** message has to be able to contain "len" + idx bytes
*/
void CMessageProtocol::LoadValueInMessage( char *message , int idx, string &command, int len )
{//private:
int i;

// this loop load the command in message
for ( i = 0; command[i] && (i < len) ; i++ )
{
message[idx] = command[i];
idx++;
}

// this loop is used for padding
for ( ; i < len; i++)
{
message[idx] = PROT_PADDING;
idx++;
}
}

Visual Studio .NET

void GEMBrokerMessengerProtocol::CGEMMessageProtocol::LoadValueInMessage(SByte* Message,
Int32 idx,
System::String& Command,
Int32 len)
{
Int32 i;
// This loop loads the command in the message
// We need to convert the value of i(Int32(int)) to
// command(System::String&)
for(i = 0; Command[i] && (i < len); i++) {
Message[idx] = Command[i];
idx++;
}

// This loop is used for padding
// this loop is used for padding
for ( ; i < len; i++)
{
Message[idx] = PROT_PADDING;
idx++;
}

} When i try and compile I get the following errors:
c:\Documents and Settings\mdyer\My Documents\Visual Studio Projects\CGEMBroker\GEMBrokerMessengerProtocol.cpp(83): error C2676: binary '[' : 'System::String' does not define this operator or a conversion to a type acceptable to the predefined operator



Ha! And I though .NET was going to be cool!! I'm gaining a headache pretty fast! Wink | ;-)
GeneralRe: Looping sending me loopy! Pin
monrobot1313-Dec-02 4:09
monrobot1313-Dec-02 4:09 
GeneralRe: Looping sending me loopy! Pin
Jeff J13-Dec-02 10:07
Jeff J13-Dec-02 10:07 
GeneralMemory leak in managed class!!! Pin
Ahmet Orkun GEDiK12-Dec-02 23:24
sussAhmet Orkun GEDiK12-Dec-02 23:24 
GeneralRe: Memory leak in managed class!!! Pin
monrobot1313-Dec-02 4:12
monrobot1313-Dec-02 4:12 
GeneralRe: Memory leak in managed class!!! Pin
Jeff J13-Dec-02 9:49
Jeff J13-Dec-02 9:49 
GeneralConversion problem Pin
Anthony_Yio12-Dec-02 15:12
Anthony_Yio12-Dec-02 15:12 
GeneralRe: Conversion problem Pin
Jeff J12-Dec-02 22:12
Jeff J12-Dec-02 22:12 
GeneralRe: Conversion problem Pin
Anthony_Yio12-Dec-02 22:28
Anthony_Yio12-Dec-02 22:28 
GeneralRe: Conversion problem Pin
Jeff J13-Dec-02 8:57
Jeff J13-Dec-02 8:57 
GeneralHelp!!!!! Pin
dyerstein11-Dec-02 9:20
dyerstein11-Dec-02 9:20 
GeneralObject * to (void *,size_t) and back Pin
Anonymous11-Dec-02 4:55
Anonymous11-Dec-02 4:55 
GeneralRe: Object * to (void *,size_t) and back Pin
Anonymous15-Dec-02 22:50
Anonymous15-Dec-02 22:50 
GeneralMFC app - porting Pin
MattG10-Dec-02 8:35
MattG10-Dec-02 8:35 
GeneralRe: MFC app - porting Pin
Maximilien10-Dec-02 8:50
Maximilien10-Dec-02 8:50 
GeneralRe: MFC app - porting Pin
MattG10-Dec-02 9:28
MattG10-Dec-02 9:28 
GeneralRe: MFC app - porting Pin
Maximilien10-Dec-02 13:43
Maximilien10-Dec-02 13:43 
GeneralRe: MFC app - porting Pin
MattG10-Dec-02 14:03
MattG10-Dec-02 14:03 

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.