Abstract NamedPipes code for windows

This commit is contained in:
Jim Norman 2006-01-17 23:08:46 +00:00
parent 41695fb0ec
commit dc7e82c080

View File

@ -216,7 +216,7 @@ namespace Novell.CASA
[In] uint ssFlags, // IN
[In] SSCS_SECRET_ID_T appSecretID,
[In] SSCS_SECRET_ID_T sharedSecretID,
int credentialType, // IN
[In, Out] ref uint credentialType, // IN
[In, Out] IntPtr pCredential,
[In, Out] SSCS_EXT_T ext
);
@ -1038,6 +1038,7 @@ namespace Novell.CASA
throw new miCasaException(miCasaException.NSSCS_E_INVALID_PARAM);
int rcode;
uint credType = 0;
BasicCredential bc = null;
SSCS_SECRET_ID_T appSecretID = new SSCS_SECRET_ID_T();
@ -1059,15 +1060,23 @@ namespace Novell.CASA
IntPtr pCredential = Marshal.AllocHGlobal(Marshal.SizeOf(credential));
Marshal.StructureToPtr(credential, pCredential, false);
rcode = miCASAGetCredential(
ssFlags,
appSecretID,
sharedID,
0,
pCredential,
new SSCS_EXT_T()
);
try
{
rcode = miCASAGetCredential(
ssFlags,
appSecretID,
sharedID,
ref credType,
pCredential,
new SSCS_EXT_T()
);
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
Marshal.FreeHGlobal(pCredential);
throw new miCasaException(-803);
}
if (rcode == 0)
{