mnGetStringC

This command gets a C string from the specified packet.

When you have finished using the string you should deallocate the memory that it is using with delete[].

The data will be taken starting at the cursor position and the cursor will be moved forward by the size of the data returned.

In C++ an overloaded version of the command exists which allows you to specify a destination string where the data will be copied into.

Parameters

long long int Packet: This is the packet that the command should use.

unsigned int Length: Length of string in bytes. Set this to 0 if the string has a prefix indicating its length.

bool NullTerminated: Specifies whether the return string should have a null terminating character added to the end of it. Note that null terminators are not added by mnAddStringC.

Returns (char*)

A C string from the receive buffer if no error occurred

A blank string if an error occurred.

Present in

C++




This page is in the following sections:
(2) Packets
(1) Miscellaneous
(0) DarkNet Help