security init failure error in win32 dll's method when calling from C# (windows and web) application.
-
Hi.. I have encountered a error while calling a method of a Win32 Dll in C# application(both windows and web), Error : 'Failed to initialize Security' (at CoInitializeSecurity method of Win32 dll - C code) Error Code: 183 (returned by Marshal.GetLastWin32Error()) This Win32 dll communicates with disk drive using WMI classes. Also doing read/Write and partition on the disk. We are using .Net Framework 2.0, Windows XP SP2. Any suggestions or advice most welcomed Thanks in advance SunAgen
-
Hi.. I have encountered a error while calling a method of a Win32 Dll in C# application(both windows and web), Error : 'Failed to initialize Security' (at CoInitializeSecurity method of Win32 dll - C code) Error Code: 183 (returned by Marshal.GetLastWin32Error()) This Win32 dll communicates with disk drive using WMI classes. Also doing read/Write and partition on the disk. We are using .Net Framework 2.0, Windows XP SP2. Any suggestions or advice most welcomed Thanks in advance SunAgen
183: Cannot create file when that file already exists. I have no idea what your .DLL does, but there are things code cannot do because it needs admin priv's or is running in a restricted sandbox, like inside Internet Explorer.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
183: Cannot create file when that file already exists. I have no idea what your .DLL does, but there are things code cannot do because it needs admin priv's or is running in a restricted sandbox, like inside Internet Explorer.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...Dear Dave Kreskowiak, Thanks for reply.. As I stated in the post, that Dll doing disk operations like Disk Partitioning,Reading data from sectors,Writing and Deleting. Fortunately all other operations, except Partitioning working well (in both Windows Application and Web application). Privileges of Administrator given by Impersonation. But that Partitioning working well in a Windows Application developed in C. problem with only dotnet application(C#). Thanks..