I suspect that you will need to create an import for it. You do this by going to references, add references, browse, locate the dll and import.
I would advise you to put the import and and other neccessary wrapper code into a separate class project. This will allow you to unit test your code more readily.
Click "Mark as Answer" on the post that helped you.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
>it's just a simple dll cobol to display a helloworld..
What language did you write cobol.dll in?
Click "Mark as Answer" on the post that helped you.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
mate.. i think we've been around and around.. here is the scenario
1) dll was written in cobol language to display a helloworld. (file name :helloworld.dll)
2) I've successfully called the above dll using VBA code (to prove the dll is working).
3) now, what i'm trying to do is calling the above dll in VB.net within the web service, like this:
<DllImport("C:\Documents and Settings\Ron\Desktop\helloworld.dll", CallingConvention:=CallingConvention.Winapi, EntryPoint:="HELLOWORD")>_
<WebMethod()> Public Sub HELLOWORD()
End Sub
4) when I run the web service I can't see the HELLOWORLD on the web.
i'm not sure whether you understand the concept of web service!!.. the dll is just a windows application and you wish to call that dll from the web serivce using VB.net...
Try using object Explorer on the import of your Cobol.dll - do you see the structure of its functions with their arguments?
Click "Mark as Answer" on the post that helped you.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
i'm not sure whether you understand the concept of web service!!.. the dll is just a windows application and you wish to call that dll from the web serivce using VB.net...
Yeah, kinda do.
I was asking to make sure you understand. The COBOL DLL (note, BTW, that I know how to spell COBOL, which should be a hint) apparently displays "Hello, World" to standard output. You ask why you can't see that display "on the web". The answer is, because
it's standard output. Just because you run it in a web service doesn't mean that standard output will suddenly be redirected to "the web". It just doesn't work that way.
ronald_yoh
Member
108 Points
519 Posts
call cobol dll
Oct 27, 2008 02:39 AM|LINK
hi there.. i;m trying to create a web service that calls cobol dll.. anyone knows how to implement this?
Thanks
R
TATWORTH
All-Star
72415 Points
14017 Posts
MVP
Re: call cobol dll
Oct 27, 2008 09:08 AM|LINK
What sort of DLL is Cobol.DLL?
I suspect that you will need to create an import for it. You do this by going to references, add references, browse, locate the dll and import.
I would advise you to put the import and and other neccessary wrapper code into a separate class project. This will allow you to unit test your code more readily.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
ronald_yoh
Member
108 Points
519 Posts
Re: call cobol dll
Oct 27, 2008 09:18 AM|LINK
hey mate... i tried to add reference but no luck..
it's just a simple dll cobol to display a helloworld..
i know the "<importdll..." but how do i use in web service?
TATWORTH
All-Star
72415 Points
14017 Posts
MVP
Re: call cobol dll
Oct 27, 2008 10:22 AM|LINK
>it's just a simple dll cobol to display a helloworld..
What language did you write cobol.dll in?
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
ronald_yoh
Member
108 Points
519 Posts
Re: call cobol dll
Oct 28, 2008 01:44 AM|LINK
mate.. i think we've been around and around.. here is the scenario
1) dll was written in cobol language to display a helloworld. (file name :helloworld.dll)
2) I've successfully called the above dll using VBA code (to prove the dll is working).
3) now, what i'm trying to do is calling the above dll in VB.net within the web service, like this:
<DllImport("C:\Documents and Settings\Ron\Desktop\helloworld.dll", CallingConvention:=CallingConvention.Winapi, EntryPoint:="HELLOWORD")>_
<WebMethod()> Public Sub HELLOWORD()
End Sub
4) when I run the web service I can't see the HELLOWORLD on the web.
Ta
johnwsaunder...
Star
11262 Points
1981 Posts
Re: call cobol dll
Oct 28, 2008 02:33 AM|LINK
When you called the COBOL DLL from VBA, did you see the output on the web?
ronald_yoh
Member
108 Points
519 Posts
Re: call cobol dll
Oct 28, 2008 03:02 AM|LINK
i'm not sure whether you understand the concept of web service!!.. the dll is just a windows application and you wish to call that dll from the web serivce using VB.net...
TATWORTH
All-Star
72415 Points
14017 Posts
MVP
Re: call cobol dll
Oct 28, 2008 05:41 AM|LINK
Try using object Explorer on the import of your Cobol.dll - do you see the structure of its functions with their arguments?
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
ronald_yoh
Member
108 Points
519 Posts
Re: call cobol dll
Oct 28, 2008 05:51 AM|LINK
did u mean solution explorer? and add reference to the dll.. as I said not working that way.. i got an error: dynamic bound RTS error..
johnwsaunder...
Star
11262 Points
1981 Posts
Re: call cobol dll
Oct 28, 2008 06:50 AM|LINK
Yeah, kinda do.
I was asking to make sure you understand. The COBOL DLL (note, BTW, that I know how to spell COBOL, which should be a hint) apparently displays "Hello, World" to standard output. You ask why you can't see that display "on the web". The answer is, because it's standard output. Just because you run it in a web service doesn't mean that standard output will suddenly be redirected to "the web". It just doesn't work that way.