forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


External DLL question

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Fri Nov 26, 2004 1:49 am    Post subject: External DLL question Reply with quote

I am trying to access an external windows .DLL. Here is sample Visual Basic code:

Code:


  Dim miDoc As MODI.Document
  Dim miLayout As MODI.Layout
   
  Set miDoc = New MODI.Document
  miDoc.Create "C:\document1.tif"
 
  miDoc.Images.OCR
 
  Set miLayout = miDoc.Images.Layout

  msgbox miLayout.Text



The code above accesses the functions in this .dll (named MODI). It opens the file "c:\document1.tif", performs optical character recognition on it, and displays the text result in a message box.

Is it possible, using @lib(), to do the same using this .DLL through VDS?

I am not asking anyone to generate the code for me, but before I try to learn how to use that function I wanted to know if it was possible.

Thanks in advance,

Joe

_________________
Joe Floyd
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Nov 26, 2004 2:02 am    Post subject: Reply with quote

It might be possible -- the code you supplied however won't provide
enough information... are you sure that's the complete code?

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri Nov 26, 2004 8:28 am    Post subject: Reply with quote

Joe, I don't think this is possible directly with VDS, because it seems that this DLL is an ActiveX or OCX one. With VDS, you can only use functions which are defined in Visual Basic as "Public Declare Function FunctionName Lib "dllname.dll" (Parameter1 As String) As Long". But, you might be able to do this with the Gadget DLL... Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Fri Nov 26, 2004 1:58 pm    Post subject: Reply with quote

Thanks for the replies - maybe I will check out VDSUG.dll. Just wanted to see if I was heading in the right direction.
_________________
Joe Floyd
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Nov 26, 2004 2:04 pm    Post subject: Reply with quote

Let us know if you make any progress -- it's an intriguing idea. Yes
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon Nov 29, 2004 11:45 pm    Post subject: Reply with quote

Joe,
Does the OCX your trying to use show the image on the screen before the OCR process takes place? In other words does the OCX need a container box on your window to use it?

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Tue Nov 30, 2004 1:03 am    Post subject: Reply with quote

I don't believe it requires that. It seems that you can simply "create" a document (and load into it a .TIF from disk) and then perform OCR and then do whatever you want with the results.

The documentation for it is here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mspauto/html/dihowUsingMODIObjectModel.asp

_________________
Joe Floyd
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Tue Nov 30, 2004 2:15 pm    Post subject: Reply with quote

Joe,
You do know that this can only be used with Microsoft Office 2003? Since I don't have Microsoft Office 2003 at home I will be trying to build this at work but only people with MS Office 2003 will be able to use this.

Also can you post a example of a *.tif file I can use to do the OCR against?

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Tue Nov 30, 2004 4:37 pm    Post subject: Reply with quote

Yep - only works with Office 2003. That is what I have installed on my computer.

I will attach a sample .TIF -

Thanks for any help or direction.



doc161.zip
 Description:

Download
 Filename:  doc161.zip
 Filesize:  200.45 KB
 Downloaded:  1114 Time(s)


_________________
Joe Floyd
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group