Abstract NamedPipes code for windows
This commit is contained in:
parent
41695fb0ec
commit
dc7e82c080
@ -216,7 +216,7 @@ namespace Novell.CASA
|
|||||||
[In] uint ssFlags, // IN
|
[In] uint ssFlags, // IN
|
||||||
[In] SSCS_SECRET_ID_T appSecretID,
|
[In] SSCS_SECRET_ID_T appSecretID,
|
||||||
[In] SSCS_SECRET_ID_T sharedSecretID,
|
[In] SSCS_SECRET_ID_T sharedSecretID,
|
||||||
int credentialType, // IN
|
[In, Out] ref uint credentialType, // IN
|
||||||
[In, Out] IntPtr pCredential,
|
[In, Out] IntPtr pCredential,
|
||||||
[In, Out] SSCS_EXT_T ext
|
[In, Out] SSCS_EXT_T ext
|
||||||
);
|
);
|
||||||
@ -1038,6 +1038,7 @@ namespace Novell.CASA
|
|||||||
throw new miCasaException(miCasaException.NSSCS_E_INVALID_PARAM);
|
throw new miCasaException(miCasaException.NSSCS_E_INVALID_PARAM);
|
||||||
|
|
||||||
int rcode;
|
int rcode;
|
||||||
|
uint credType = 0;
|
||||||
BasicCredential bc = null;
|
BasicCredential bc = null;
|
||||||
|
|
||||||
SSCS_SECRET_ID_T appSecretID = new SSCS_SECRET_ID_T();
|
SSCS_SECRET_ID_T appSecretID = new SSCS_SECRET_ID_T();
|
||||||
@ -1059,15 +1060,23 @@ namespace Novell.CASA
|
|||||||
IntPtr pCredential = Marshal.AllocHGlobal(Marshal.SizeOf(credential));
|
IntPtr pCredential = Marshal.AllocHGlobal(Marshal.SizeOf(credential));
|
||||||
Marshal.StructureToPtr(credential, pCredential, false);
|
Marshal.StructureToPtr(credential, pCredential, false);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
rcode = miCASAGetCredential(
|
rcode = miCASAGetCredential(
|
||||||
ssFlags,
|
ssFlags,
|
||||||
appSecretID,
|
appSecretID,
|
||||||
sharedID,
|
sharedID,
|
||||||
0,
|
ref credType,
|
||||||
pCredential,
|
pCredential,
|
||||||
new SSCS_EXT_T()
|
new SSCS_EXT_T()
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.WriteLine(e.ToString());
|
||||||
|
Marshal.FreeHGlobal(pCredential);
|
||||||
|
throw new miCasaException(-803);
|
||||||
|
}
|
||||||
|
|
||||||
if (rcode == 0)
|
if (rcode == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user