# Load module failed(SDKERR\_MODULE\_LOAD\_FAILED) in C#

**URL:** <https://devforum.zoom.us/t/load-module-failed-sdkerr-module-load-failed-in-c/293>\
**Category:** Windows\
**Created:** [July 5, 2017, 8:44am UTC](https://devforum.zoom.us/t/load-module-failed-sdkerr-module-load-failed-in-c/293 "2017-07-05T08:44:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rex\_Wang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rex_wang/32/1157_2.png) [@Rex\_Wang](https://devforum.zoom.us/u/Rex_Wang)\
**Post date:** [July 5, 2017, 8:44am UTC](https://devforum.zoom.us/t/load-module-failed-sdkerr-module-load-failed-in-c/293/1 "2017-07-05T08:44:42Z")

</div>

When I call sdk in C#, I got&nbsp;SDKERR\_MODULE\_LOAD\_FAILED, here is the code, could me please help me resolve this as soon as possible, thanks a lot:

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]  
public struct InitParam  
{  
public string strWebDomain;///\< Web Domain  
public string strBrandingName;///\< Branding name  
public string strSupportUrl;///\< Support Url  
public IntPtr hResInstance;///\< resource moudle handle  
public UInt32 uiWindowIconSmallID;///\< windows small icon file path  
public UInt32 uiWindowIconBigID;///\< windows small icon file path  
public SDK\_LANGUAGE\_ID emLanguageID;///\< sdk language ID  
};

static class Program  
{  
[DllImport(@“c:\users\rex\documents\visual studio 2015\Projects\WindowsFormsApplication1\WindowsFormsApplication1\zoom\bin\sdk.dll”, EntryPoint = “InitSDK”, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]  
public static extern SDKError InitSDK(ref InitParam initParam);

/// \<summary\>  
/// The main entry point for the application.  
/// \</summary\>  
[STAThread]  
static void Main()  
{  
InitParam param = new InitParam();  
param.strWebDomain = “[https://zoom.us](https://zoom.us)”;  
SDKError error = InitSDK(ref param);  
Application.EnableVisualStyles();  
Application.SetCompatibleTextRenderingDefault(false);  
Application.Run(new Form1());  
}  
}

 ![](https://support.zoom.us/hc/user_images/fSIv840ymd3O-dm9UVyM7g.png)

---

<div class="post-metadata">

**Author:** ![dats\_liao](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dats_liao/32/464_2.png) [@dats\_liao](https://devforum.zoom.us/u/dats_liao)\
**Post date:** [July 5, 2017, 9:16am UTC](https://devforum.zoom.us/t/load-module-failed-sdkerr-module-load-failed-in-c/293/2 "2017-07-05T09:16:57Z")

</div>

two options to fix this issue.

1.put the sdk dlls into the same folder with exe file.

2.import kernel32 method SetDllDirectory, and config the sdk dlls path

[DllImport(“kernel32.dll”, CharSet = CharSet.Unicode, SetLastError = true, CallingConvention = CallingConvention.Winapi)]  
public static extern bool SetDllDirectory(string lpPathName);

SetDllDirectory(sdk dlls folder path);

//after that, init sdk.

&nbsp;

---

<div class="post-metadata">

**Author:** ![Rex\_Wang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rex_wang/32/1157_2.png) [@Rex\_Wang](https://devforum.zoom.us/u/Rex_Wang)\
**Post date:** [July 5, 2017, 9:26am UTC](https://devforum.zoom.us/t/load-module-failed-sdkerr-module-load-failed-in-c/293/3 "2017-07-05T09:26:52Z")

</div>

Using the option 1, &nbsp;the issue is fixed. Thank you very much for your quick and useful solution.

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [August 26, 2021, 6:45pm UTC](https://devforum.zoom.us/t/load-module-failed-sdkerr-module-load-failed-in-c/293/4 "2021-08-26T18:45:06Z")

</div>

Marking as solved.

-Tommy

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [August 26, 2021, 6:45pm UTC](https://devforum.zoom.us/t/load-module-failed-sdkerr-module-load-failed-in-c/293/5 "2021-08-26T18:45:09Z")

</div>


