Wireless Communication Library Support Forum

Legacy => Wireless Communication Library => Topic started by: ehartwell on June 03, 2009, 11:07:56 PM

Title: Enhancement request: wclErrors::wclGetErrorString
Post by: ehartwell on June 03, 2009, 11:07:56 PM
In wclErrors.cpp, the wclErrors::wclShowError() method calls AfxMessageBox() to display the error string. Could you add a method that returns the string alone?

Something like CString wclErrors::wclGetErrorString(int iError) would be handy for debug messages (or non-localized display in .NET applications).

Thanks.
Title: Re: Enhancement request: wclErrors::wclGetErrorString
Post by: Mike Petrichenko on June 03, 2009, 11:32:02 PM
Hi,

I will add your request into To Do List.
Title: Re: Enhancement request: wclErrors::wclGetErrorString
Post by: ehartwell on June 03, 2009, 11:32:54 PM
Something like CString wclErrors::wclGetErrorString(int iError) would be handy
Here's what I'm using for .NET access:
Code: [Select]
System::String^ wclErrors::wclGetErrorString(int iError)
{
return gcnew System::String(wclGetErrorText(iError));
}

bool wclErrors::wclShowError(int iError)
{
if (iError == WCL_E_SUCCESS)
return false;

AfxMessageBox(wclGetErrorText(iError));

return true;
}


CString wclErrors::wclGetErrorText(int iError)
{
CString Str;

switch (iError)
{
case WCL_E_OUT_OF_RESOURCE:
Str = L"Out of system resources.";
break;

<<<snippage>>>>

}

return Str;
}
Title: Re: Enhancement request: wclErrors::wclGetErrorString
Post by: Mike Petrichenko on June 03, 2009, 11:55:34 PM
It is very nice, but have you read the License Agreement, easpecially this lines:
Quote
ENGAGING IN ANY OF THE ACTIVITIES LISTED BELOW WILL TERMINATE THE SOFTWARE LICENSE. IN ADDITION TO SOFTWARE LICENSE TERMINATION, SOFT SERVICE COMAPNY MAY PURSUE CRIMINAL, CIVIL, OR ANY OTHER AVAILABLE REMEDIES.

   1. Distribution of any files contained in this software package, other than the runtime packages explicitly listed above, including but not limited to .PAS, .DFM, .DCU, .CPP, .C, .HPP, .H files, .DCP files, and design-time packages.
   
   2. Modification, decompilation, disassembly, reverse engineering or translation of the Product.
   
   3. Removal of proprietary notices, labels or marks from the Product or Product Documentation.
   
   4. Inclusion of the Product in a development environment.
   
   5. Creation of an application that does not differ materially from the Product.
   
   6. Creation of an application (whether it is freeware, shareware or a commercial product) which competes directly or indirectly with the Product
Title: Re: Enhancement request: wclErrors::wclGetErrorString
Post by: Mike Petrichenko on June 04, 2009, 04:39:03 PM
Hi,

requested function has been implemeneted and will be available in next release.