Hello All!
I've encountered with the error when I call a method of dependency
library (written in managed VC++) from Smart Client placed on a web
page. In general, I make a call to the Windows function and I get from
GetLastError – "<127> The specified procedure could not be found"
error.
Below is more detailed information about the problem.
Operation system: Windows XP Pro SP2
..NET Framework 1.1
I should display all available Bluetooth devices on my web-page. The
web-page is displayed in IE 6.0 and belonged to the trusted site.
On the page I call the method of the class that placed on the web-page
as follow:
<object id="bluetoothService"
classid="http:dll/myService.dll#MyService.BluetoothService" />
<script>
…
bluetoothService.GetBluetoothDevices();
…
</script>
The myService library is the managed library written in C#. The method
GetBluetoothDevices makes a call to method DiscoverDevices(…) from
another my library Bluetooth.dll, written in managed VC++. In the
method DiscoverDevices(…) there is a call to the
BluetoothFindFirstDevice(…) from the Platform SDK.
All libraries (myService.dll and Bluetooth.dll) are located in the
folder ‘dll' of the web-site.
When I've tested my code in the stand-alone win-form application, the
all code works fine!
But when I've started it from the web-page, after
BluetoothFindFirstDevice I've got the error code 127 returned from
Marshal::GetLastWin32Error() function (127 - The specified procedure
could not be found).
Also I've checked how my libraries are located in the GAC. I've ran
"gacutil /ldl" and both myService.dll and Bluetooth.dll are displayed.
Also I've tried to clear the GAC ("gacutil /cdl") and have stared the
page again – no successful result ((
And one interesting thing.
In the Bluetooth.dll there is a call to the
BluetoothAuthenticateDevice(…) method from the Platform SDK. This call
is successful from win-form test application and from the web-page. I
don't know how to explain it…………
Please, help me understand what is the error?
I would be glad to receive any help.
Thanks in advance for your comments and advices!
With best regards,
Eugene Safrankow.