Page 1 of 1

Cant run application standalone

Posted: Fri Mar 17, 2006 1:27 pm
by mweb4420
My problem is that, after I have successfully deployed my application to the PocketPC, and it has run and completed. I can run the application again standalone on the PDA by executing the exe on it.

When I reset or switch off the PDA and I try to run the application again, it doesn’t start saying that bluetool.dll is not installed. But it is still present in the Windows folder of the PDA.

the exact error message is:
"BlueTools.dll not installed. Please visit franson.com/bluetools for mote info"

when I click on details is displays:
Final.exe
Execption
BlueTools.dll not installed. Please visit franson.com/bluetools for more info

at Franson.BlueTools.License..ctor()
at Final.ConnManager..ctor()
at Final.Form1..ctor()
at Final.Program.Main()


When I select Quit the following message appears:
An unexpected error has occured in Final.exe
Select Quit and then restart this program, or select Details for more information

Can't fin PInvoke DLL 'BlueTools.dll'

Could you please assists.

Thanx

RE: Cant run application standalone

Posted: Fri Mar 17, 2006 7:50 pm
by Jonas
* What kind of Pocket PC are you using?
* Which version of BlueTools have you installed?
* What are you using to develop your application?
* What bluetooth stack is your Pocket PC using?

Also, have you tried copying the files from the Windows folder to the application directory?

Regards,
Jonas
Franson Support

RE: Cant run application standalone

Posted: Mon Mar 20, 2006 10:09 am
by mweb4420
Hi Jonas

1. I am using a HP iPAQ hx24000, Pocket PC running Windows Mobile 5.0
2. I have downloaded the latest version of Bluetools last week
3. I am using Microsoft Visual Studio 2005 C#
4. I tis using the Widcomm stack

The latest problem I have had is that I could get the application to run standalone on the Pocket PC in the following manner.
- I deploy the application from Visual Studio, then the Pocket PC displays a message that either it could not load the bluetooth driver, but mostly that bluetools is not installed. Then I have to exit the debugger.
- I then run the bluetools cab file on the PDA, and reset it, then the application runs from the PDA stanalone everytime. But I can't debug my code.

Please... what's going here..????
Any help would be greatly appreciated

RE: Cant run application standalone

Posted: Mon Mar 20, 2006 11:59 am
by Jonas
The most common reason for errors like yours is that you are using the wrong DLLs for your processor. Since it works from outside the debugger I would suggest you see if you have more than one set of BlueTools DLLs on the PDA. Maybe one version that are copied with the deployment to the application directory and one copy installed in the Windows directory.

Also, the BlueTools cab should be installed before attempting to debug your code...but maybe you mean that you have to reinstall the cab to make it work again?

Regards,
Jonas
Franson Support

RE: Cant run application standalone

Posted: Mon Mar 20, 2006 12:42 pm
by mweb4420
Hi Jonas...
Thanx for your response.

I have at this stage a copy of the dlls in the windows and the application directory. But this is becuase it doesnt run when there is only a copy of the dlls in the application directory.

Should I remove the dlls from the application directory and only have them in the Windows directory?

And at this stage I cannot debug my code at all, but I have to reinstall the cab to make it run on the PDA.

I am using the cab file supplied for the compact dotNet framework "Bluetools.arm.CAB", so I dont know if it is possible to use the wrong dlls for the processor.

Any help would be appreciated

RE: Cant run application standalone

Posted: Mon Mar 20, 2006 1:11 pm
by Jonas
Well BlueTools will work with the files only in the application directory. Are you certain that the correct files are put in the application directory.

If you look at this thread: http://franson.com/forum/topic.asp?TOPIC_ID=2183

Here the problem was using the DLL-files for BlueTools Desktop on the Pocket PC. If you have installed BlueTools with the cab-file there shouldn't be any other BlueTools files in the application directory than the .NET wrappers.

Regards,
Jonas
Franson Support

RE: Cant run application standalone

Posted: Mon Mar 20, 2006 5:59 pm
by mweb4420
Hi Jonas.

When you say that the application will run with the DLLs only in the application directory. Do you mean that I can delete all the bluetools dlls from the Windows directory?

Or should I rather copy the bluetools dlls from the windows directory into the application directory, and then delete the dlls in the windows directory just to make sure that I have the right dlls.

Thanks for your help..

Regards
Robert

RE: Cant run application standalone

Posted: Mon Mar 20, 2006 6:08 pm
by Jonas
The files in the Windows directory is just like almost every Windows dll-file, it's there to prevent multiple copies being spread all over your system. By having them in the Windows directory all Bluetools applications on the PDA can access them.

But if you experience problems like you do, it can be wise to remove them and only keep them in the application folder to make sure the application is actually reading the correct files...

The files necessary is (according to Bluetools reference manual):

BlueTools.dll.
BlueToolsMS.dll (Microsoft stack support).
BlueToolsWC.dll (WidComm stack support).
BlueToolsWC150.dll (Extended WidComm stack support).

The Franson.BlueTools.dll is also needed to access Bluetools from a .NET application.

What you really need to do is make sure you are using the correct DLL-files for your PDA. Check the filesizes for example; DLL's for the ARM-processor (that I guess you should be using) are in the interval 135 kb (for the smallest) to 167 kb (for the largest). The desktop versions of the same files are in the range from 164-180 kb.


Regards,
Jonas
Franson Support

RE: Cant run application standalone

Posted: Mon Mar 20, 2006 6:17 pm
by mweb4420
Thanx for all your support.

I will come back to you on this matter as soon as I have a chance.

Regards
Robert