Server IP : 185.86.78.101 / Your IP : 216.73.216.124 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/share/swig4.0/csharp/ |
Upload File : |
/* ----------------------------------------------------------------------------- * wchar.i * * Typemaps for the wchar_t type * These are mapped to a C# String and are passed around by value. * * Support code for wide strings can be turned off by defining SWIG_CSHARP_NO_WSTRING_HELPER * * ----------------------------------------------------------------------------- */ #if !defined(SWIG_CSHARP_NO_WSTRING_HELPER) #if !defined(SWIG_CSHARP_WSTRING_HELPER_) #define SWIG_CSHARP_WSTRING_HELPER_ %insert(runtime) %{ /* Callback for returning strings to C# without leaking memory */ typedef void * (SWIGSTDCALL* SWIG_CSharpWStringHelperCallback)(const wchar_t *); static SWIG_CSharpWStringHelperCallback SWIG_csharp_wstring_callback = NULL; %} %pragma(csharp) imclasscode=%{ protected class SWIGWStringHelper { [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)] public delegate string SWIGWStringDelegate(global::System.IntPtr message); static SWIGWStringDelegate wstringDelegate = new SWIGWStringDelegate(CreateWString); [global::System.Runtime.InteropServices.DllImport("$dllimport", EntryPoint="SWIGRegisterWStringCallback_$module")] public static extern void SWIGRegisterWStringCallback_$module(SWIGWStringDelegate wstringDelegate); static string CreateWString([global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]global::System.IntPtr cString) { return global::System.Runtime.InteropServices.Marshal.PtrToStringUni(cString); } static SWIGWStringHelper() { SWIGRegisterWStringCallback_$module(wstringDelegate); } } static protected SWIGWStringHelper swigWStringHelper = new SWIGWStringHelper(); %} %insert(runtime) %{ #ifdef __cplusplus extern "C" #endif SWIGEXPORT void SWIGSTDCALL SWIGRegisterWStringCallback_$module(SWIG_CSharpWStringHelperCallback callback) { SWIG_csharp_wstring_callback = callback; } %} #endif // SWIG_CSHARP_WSTRING_HELPER_ #endif // SWIG_CSHARP_NO_WSTRING_HELPER // wchar_t %typemap(ctype) wchar_t "wchar_t" %typemap(imtype) wchar_t "char" // Requires adding CharSet=CharSet.Unicode to the DllImport to correctly marshal Unicode characters %typemap(cstype) wchar_t "char" %typemap(csin) wchar_t "$csinput" %typemap(csout, excode=SWIGEXCODE) wchar_t { char ret = $imcall;$excode return ret; } %typemap(csvarin, excode=SWIGEXCODE2) wchar_t %{ set { $imcall;$excode } %} %typemap(csvarout, excode=SWIGEXCODE2) wchar_t %{ get { char ret = $imcall;$excode return ret; } %} %typemap(in) wchar_t %{ $1 = ($1_ltype)$input; %} %typemap(out) wchar_t %{ $result = (wchar_t)$1; %} %typemap(typecheck) wchar_t = char; // wchar_t * %typemap(ctype) wchar_t * "wchar_t *" %typemap(imtype, inattributes="[global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]", out="global::System.IntPtr" ) wchar_t * "string" %typemap(cstype) wchar_t * "string" %typemap(csin) wchar_t * "$csinput" %typemap(csout, excode=SWIGEXCODE) wchar_t * { string ret = global::System.Runtime.InteropServices.Marshal.PtrToStringUni($imcall);$excode return ret; } %typemap(csvarin, excode=SWIGEXCODE2) wchar_t * %{ set { $imcall;$excode } %} %typemap(csvarout, excode=SWIGEXCODE2) wchar_t * %{ get { string ret = $imcall;$excode return ret; } %} %typemap(in) wchar_t * %{ $1 = ($1_ltype)$input; %} %typemap(out) wchar_t * %{ $result = (wchar_t *)$1; %} %typemap(typecheck) wchar_t * = char *;