Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

AzureDeviceManagementClient.exe Can't load a custom plugin #16

Closed
v-jiq opened this issue Mar 20, 2019 · 4 comments
Closed

AzureDeviceManagementClient.exe Can't load a custom plugin #16

v-jiq opened this issue Mar 20, 2019 · 4 comments
Assignees

Comments

@v-jiq
Copy link

v-jiq commented Mar 20, 2019

I want to load custom plugin ,So I create a new plugin and put it to Correct position and modify Related configuration file.
The above operations are completely in accordance with the guidance of this document.
-- https://github.com/ms-iot/azure-client-tools/blob/master/docs/device-agent/development-scenario/developer-plugin-creation.md .

But when I execute ".\AzureDeviceManagementClient.exe -debug" will can't normally running.
below is log picture. the plugin name is DroneCtlPlugin.dll.
1553058827(1)

@gmileka
Copy link
Collaborator

gmileka commented Mar 22, 2019

Hi v-jiq,

We have seen similar logs when the plug-in had some missing dependencies. Is it possible that it requires some dlls and they are not at the same folder?

If that's not the case, I would recommend to temporary change the plug-in configuration from out-of-proc to in-proc. You can do that by changed the plug-in manifest file and setting the "outOfProc" to false. This should narrow down the problem - and the you can share the logs again...

Let us know how this goes...

thanks,
george

@gmileka gmileka self-assigned this Mar 22, 2019
@v-jiq
Copy link
Author

v-jiq commented Mar 22, 2019

Hi george,
I have retried according to your guide , that temporary change the plug-in configuration from out-of-proc to in-proc.

the log prompts that failed to load library SampleComponentNamePlugin.dll. but I have putted SampleComponentNamePlugin.dll to Specified directory. The SampleComponentNamePlugin.dll are generate by refer to this link -- https://github.com/ms-iot/azure-client-tools/blob/master/docs/device-agent/development-scenario/developer-plugin-creation.md and no modify anything.

below is log:
1553234061

configure file:
1553237193(1)

dll:
1553237336(1)

Thanks

@gmileka
Copy link
Collaborator

gmileka commented Mar 22, 2019

Hi v-jiq,

The device agent finds the dll. So, your configuration seem to be fine.

The error returned is 193 - looking this up in Windows codes, it's "is not a valid Win32 application".

Does the architecture of the dll matches the architecture of the agent/device? (x64, win32, arm, etc).

thanks,
george

@v-jiq
Copy link
Author

v-jiq commented Mar 26, 2019

Thanks george, as you said, the architecture error caused this problem!!

@v-jiq v-jiq closed this as completed Mar 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants