MapWindow Developer Team : MapWindow Discussion Forum
Hi all, I am developing a Plug-in, in which a new item is added to the menu and when it is clicked a new form will be loaded. By clicking the button it uses a .dll file(lying in hard disk) and generates and populates a .txt file, somewhere in hard disk and again this .
New Developed Plug-in Related Issue
Posted by:
meetmukesh ()
Date: December 24, 2009 04:34AM
Hi all,
I am developing a Plug-in, in which a new item is added to the menu and when it is clicked a new form will be loaded.
By clicking the button it uses a .dll file(lying in hard disk) and generates and populates a .txt file, somewhere in hard disk and again this .txt file is accessed from the same form to generate Graph of the data values.
now the problem is
1) seperatly this program is running fine. but whenever i do the same by attaching the program with MapWIndow, it doesnt generate txt file at the desired location.
i may also provide the snippet of the code, if needed.
any suggestion would be appreciated.
Thanks
I am developing a Plug-in, in which a new item is added to the menu and when it is clicked a new form will be loaded.
By clicking the button it uses a .dll file(lying in hard disk) and generates and populates a .txt file, somewhere in hard disk and again this .txt file is accessed from the same form to generate Graph of the data values.
now the problem is
1) seperatly this program is running fine. but whenever i do the same by attaching the program with MapWIndow, it doesnt generate txt file at the desired location.
i may also provide the snippet of the code, if needed.
any suggestion would be appreciated.
Thanks
Re: New Developed Plug-in Related Issue
Posted by:
pmeems ()
Date: December 27, 2009 03:14AM
Showing some code how you write the txt file would be helpful.
You're sure you're not having rights issues?
When you debug your plug-in do you get an error message?
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
You're sure you're not having rights issues?
When you debug your plug-in do you get an error message?
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Re: New Developed Plug-in Related Issue
Posted by:
meetmukesh ()
Date: December 30, 2009 09:30PM
Thank you for the reply!
This is how i access .dll file
Private Const dllfilename As String = "C:\folder\Debug\mydll.dll"
<DllImport(dllfilename, EntryPoint:="myFunction", CharSet:=CharSet.Ansi)> _
Public Shared Function myFunction(ByVal a As Integer, ByVal b As Integer, ByVal c As Double, ByVal d As Double, ByVal D_PPM As Double(), _
ByVal Z_PPM As Double(), ByVal e As Double, ByVal f As Double) As IntPtr
End Function
when all these inputs r given to this .dll file, it executes and generates a .txt file as an output. Now, seperately this program is running fine, but its not generating that .txt file when i execute it after adding it into MapWindow!
i dont get you point "Right Issues?"
It doesnt show any dubug erroe, in fact , i have been able to add another menu in mapwindow so i dont think theres any issue related to that. Rest, you can tell better.
This is how i access .dll file
Private Const dllfilename As String = "C:\folder\Debug\mydll.dll"
<DllImport(dllfilename, EntryPoint:="myFunction", CharSet:=CharSet.Ansi)> _
Public Shared Function myFunction(ByVal a As Integer, ByVal b As Integer, ByVal c As Double, ByVal d As Double, ByVal D_PPM As Double(), _
ByVal Z_PPM As Double(), ByVal e As Double, ByVal f As Double) As IntPtr
End Function
when all these inputs r given to this .dll file, it executes and generates a .txt file as an output. Now, seperately this program is running fine, but its not generating that .txt file when i execute it after adding it into MapWindow!
i dont get you point "Right Issues?"
It doesnt show any dubug erroe, in fact , i have been able to add another menu in mapwindow so i dont think theres any issue related to that. Rest, you can tell better.
Re: New Developed Plug-in Related Issue
Posted by:
pmeems ()
Date: January 04, 2010 04:36AM
With 'Right issues' I mean are you allowed to write the txt file in that folder.
Can you call other functions of the dll?
You're use your plug-in is communicating with your other dll?
In what language is your other dll written? If it is in a .NET language you might consider adding the code to your plug-in instead of the dll.
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Can you call other functions of the dll?
You're use your plug-in is communicating with your other dll?
In what language is your other dll written? If it is in a .NET language you might consider adding the code to your plug-in instead of the dll.
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Re: New Developed Plug-in Related Issue
Posted by:
meetmukesh ()
Date: January 05, 2010 03:58AM
Ok, let me make it more simple.
1) The other .dll is written in VC++
2) I have full rights to "Write" and "Read" in .txt file generated by the .dll file.
3) i am writing the program in .NET environment that will use this .dll(mentioned in point 1)
4) When i am running the program seperately, it works fine. it generates .txt file at the desired location with desired values written into it.
5) But when i try to attach my program with MapWindow and try to run it, its not performing the above operations.
I hope, i am clear to you now.
Regards,
Edited 1 time(s). Last edit at 01/05/2010 04:02AM by meetmukesh.
1) The other .dll is written in VC++
2) I have full rights to "Write" and "Read" in .txt file generated by the .dll file.
3) i am writing the program in .NET environment that will use this .dll(mentioned in point 1)
4) When i am running the program seperately, it works fine. it generates .txt file at the desired location with desired values written into it.
5) But when i try to attach my program with MapWindow and try to run it, its not performing the above operations.
I hope, i am clear to you now.
Regards,
Edited 1 time(s). Last edit at 01/05/2010 04:02AM by meetmukesh.
Re: New Developed Plug-in Related Issue
Posted by:
pmeems ()
Date: January 06, 2010 01:06AM
It is very hard for me to debug your program.
You are able to step through your plug-in in debug mode?
If you add a dummy function to your dll returning a string can you call that function with your plug-in. E.g. are you sure the plug-in can communicate with your other dll?
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
You are able to step through your plug-in in debug mode?
If you add a dummy function to your dll returning a string can you call that function with your plug-in. E.g. are you sure the plug-in can communicate with your other dll?
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Re: New Developed Plug-in Related Issue
Posted by:
meetmukesh ()
Date: January 06, 2010 08:49PM
Yes, You are right. My MapWindow application is not communicating with the other dll file, thats why it performs operation seperately but not when attached with MapWindow.
Could you please tell, how do i do that programatically in vb/c# .net?
Say, if i hav a .dll for adding two integers?
I have two textboxes on the forms, Input given to these textboxes goes to .dll file and the result is shown in another textbox over that form.
Thanks for your advices..
Could you please tell, how do i do that programatically in vb/c# .net?
Say, if i hav a .dll for adding two integers?
I have two textboxes on the forms, Input given to these textboxes goes to .dll file and the result is shown in another textbox over that form.
Thanks for your advices..
Re: New Developed Plug-in Related Issue
Posted by:
pmeems ()
Date: January 08, 2010 04:39AM
Can you create a simple exe application (without any MW stuff) that will use your dll to check if the problem is with MW not communicating with your dll or your dll not communicating with anything.
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Re: New Developed Plug-in Related Issue
Posted by:
meetmukesh ()
Date: January 08, 2010 04:57AM
I have got the dll working. Now, its giving the desired results.
Thanks so much.
Thanks so much.
Re: New Developed Plug-in Related Issue
Posted by:
pmeems ()
Date: January 08, 2010 12:53PM
Could you tell us how you did that, for future reference?
Thanks,
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Thanks,
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Re: New Developed Plug-in Related Issue
Posted by:
meetmukesh ()
Date: January 11, 2010 02:39AM
I did it by the code snippet, i have pasted above only. Actually, there was a problem in passing arguments to the function, once arguments are passed correct it generated desired output(a .txt file).
Then i attached same code to MW and it is working there also.
Though, i hav not worked on communication of these two much, now i will be working on the communication of these two seperate entities together.
Thanks for all your help and advices.
Then i attached same code to MW and it is working there also.
Though, i hav not worked on communication of these two much, now i will be working on the communication of these two seperate entities together.
Thanks for all your help and advices.
Sorry, only registered users may post in this forum.


