Adminpaq sdk adminpaqerror.cs

Solo disponible en BuenasTareas
  • Páginas : 2 (277 palabras )
  • Descarga(s) : 0
  • Publicado : 10 de septiembre de 2012
Leer documento completo
Vista previa del texto
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace ClaseErrorAP
{
public class cErrorString
{[DllImport("MGW_SDK.dll", EntryPoint = "finicializasdk")]
public static extern int finicializasdk();
[DllImport("MGW_SDK.dll", EntryPoint = "fterminasdk")]
public static extern voidfterminasdk();
[DllImport("MGW_SDK.dll", EntryPoint = "fabreempresa")]
public static extern int fabreempresa(string xempresa);
[DllImport("MGW_SDK.dll", EntryPoint ="fcierraempresa")]
public static extern int fcierraempresa();
[DllImport("MGW_SDK.dll", EntryPoint = "fError")]
public static extern void fError(int xerror, StringBuilder xmsg, intxmsglength);

static String adminpaqlasterror;
static String adminactivity;
static String alt_productnumber;



public static String adminpaqerror(int xerror){
adminpaqlasterror = "";
if (xerror > 0)
{
try
{
StringBuilder s = new StringBuilder();s.Append('\0', 350);
fError(xerror, s, 350);
adminpaqlasterror = "sdk adminpaq - [error: " + xerror.ToString() + "] " +unsetadminpaqstring(s.ToString()) +
" - numprod: " + alt_productnumber + " - activity: " + adminactivity;
adminactivity = "";
////MessageBox.Show("NotCritical: "+ adminpaqlasterror);

//Console.WriteLine("NotCritical: " + adminpaqlasterror);
////noncriticalerrorhandler("adminpaqerror", "err-xxx",////adminpaqlasterror,
////"falla en " + adminpaqlasterror, "adminpaq sdk error", "");
return "NotCritical: " + adminpaqlasterror;
}...
tracking img