Abstract NamedPipes code for windows
This commit is contained in:
		| @@ -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); | ||||||
| 			 | 			 | ||||||
| 			rcode = miCASAGetCredential( | 			try  | ||||||
| 				ssFlags, | 			{ | ||||||
| 				appSecretID, | 				rcode = miCASAGetCredential( | ||||||
| 				sharedID, | 					ssFlags, | ||||||
| 				0, | 					appSecretID, | ||||||
| 				pCredential, | 					sharedID, | ||||||
| 				new SSCS_EXT_T() | 					ref credType, | ||||||
| 				); | 					pCredential, | ||||||
|               | 					new SSCS_EXT_T() | ||||||
|  | 					); | ||||||
|  | 			} | ||||||
|  | 			catch (Exception e) | ||||||
|  | 			{ | ||||||
|  | 				Console.WriteLine(e.ToString()); | ||||||
|  | 				Marshal.FreeHGlobal(pCredential); | ||||||
|  | 				throw new miCasaException(-803); | ||||||
|  | 			} | ||||||
|  |  | ||||||
| 			if (rcode == 0) | 			if (rcode == 0) | ||||||
| 			{ | 			{ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user