Rank: Newbie
Groups: Registered, Registered Users Joined: 3/22/2006(UTC) Posts: 7
|
From MS VB 6.0,
when i call MSFL_GetErrorMessage(..), I get the following error:
Error
The specified module could not be found.
OK
Many other functions work fine. Do I need a different version? I believe I am on version 9.1. of the SDK
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/28/2005(UTC) Posts: 276 Location: Salt Lake City, UT
|
What is it that you're trying to do?
That function is defined in the MSFL.inc file.
Make sure that you are including that when you build.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 3/22/2006(UTC) Posts: 7
|
I'm just trying to use the function as definded in MSFL.bas. I have only included MSFL.bas and MSFLUtil.bas, I have not referenced or included any other files.
Thanks,
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/28/2005(UTC) Posts: 276 Location: Salt Lake City, UT
|
I seem to be a bit confused.
I am really sure when I read your post yesterday, it said you were looking at MSFL_ErrTest().
Now I see it says MSFL_GetErrorMessage().
So, if I read it wrong yesterday, I appoligize.
It should be MSFL1_GetErrorMessage(). You're missing the 1.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 3/22/2006(UTC) Posts: 7
|
yeah, I am trying to run the MSFL_ErrTest in the MSFLUtil.bas file.
when it tries to execute:
strErrMsg = MSFL1_GetErrorMessage(iErr, strErrMsg, MSFL_MAX_ERR_MSG_LENGTH)
is when the error comes up.
thanks,
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/19/2005(UTC) Posts: 2,995
Was thanked: 14 time(s) in 10 post(s)
|
R U trying to run this sampe code in VB6? The *.BAS samples are designed for VB6 and work fine using the sample data provided.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 3/22/2006(UTC) Posts: 7
|
yes, i am having the same proble with the sample code (vbviewer). I added
Call MSFL_ErrTest(-189)
to the function
Private Sub mnuFileOpen_Click()
in frmMain, and the same error comes up.
I am, however, able to open files and look at the data with the program.
thanks,
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/19/2005(UTC) Posts: 2,995
Was thanked: 14 time(s) in 10 post(s)
|
kztd-
Arghhh... I just typed in a thoughtful response and lost it all. When I hit the backspace, it was gone... how frustrating. :-(
To run the VB6 example, you need VB6 to be installed. Even if you are tying to convert it into the NET platform, you will initially need VB6.
Look at the function that the MSFL_ErrTest sub is calling. It is MSFL1_GetErrorMessage. Pay attention to the format of the return string. I'm not in front of my MDK at the moment, but from memory I think it is fixed length and null terminated. That matters. Also, make sure that the integer value you are passing is valid. There is a list of valid codes in the back of the MSFL chapter of the User's Manual.
If you will post a snippet of your code, I will try to help you figure it out.
G
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 3/22/2006(UTC) Posts: 7
|
umm, I get the feeling u didnt read my last post.
My code snippet is to add the line:
Call MSFL_ErrTest(-189)
as the first line in the function
Private Sub mnuFileOpen_Click()
in frmMain of the example code, VIEWER.VBP using MS VB 6.0. Having done that, I get the error message everytime I hit file-open. I'm not programming anything new here, I'm just trying to call the MSFL_ErrTest(..) with a value.
My 3 ideas are:
#1 - It doesnt work on yours either
#2 - There is something funny about my installation, and I'm calling an old .dll
#3 - There is something funny about my installation, and the correct .dll can't find some ancillary file
Please note, the program compiles and works fine. It is making many successful calls to the other functions and I can see my files, and their data.
Thanks,
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/19/2005(UTC) Posts: 2,995
Was thanked: 14 time(s) in 10 post(s)
|
Ok, I'm reading what you are writing, but I'm not understanding your difficulty. I suppose I thought you might be getting stuck trying to convert the code. The VB6 MSFL example on the disk that ships with the MDK works fine using VB6. Indeed, the -189 integer that you are trying to pass is valid for this constant assignment:
Public Const MSFL_ERR_TOO_MANY_COMPOSITES = -189
When I run it, in the manner you are seeking to know about, it works fine. So, you can scratch #1 from your list of 3 ideas. Good luck with the others. The dll file that you need for your version of the MDK is located in the \\\\MSFL\\Dll folder. It is defined, in this instance, in the function call to MSFL1_GetErrorMessage Lib "msfl80d" (). The name of this dll will vary depending upon which MDK version you are using. You have installed the MDK and have the included dll in a global path folder... right? By default, it will install in the C:\\WINDOWS\\system32 folder.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 3/22/2006(UTC) Posts: 7
|
ok, we're on the same page. Now can we use the same .dll?
Im using
MSFL1_GetErrorMessage Lib "msfl91d" (..)
Thanks,
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/28/2005(UTC) Posts: 276 Location: Salt Lake City, UT
|
kztd wrote:ok, we're on the same page. Now can we use the same .dll?
Im using
MSFL1_GetErrorMessage Lib "msfl91d" (..)
Thanks,
I installed MDK 9.1, opened the sample, and added the line: Call MSFL_ErrTest(-189) to the first line mnuFileOpen_Click().
I then ran the sample, selected the File | Open, and got the error message as expected.
It is working fine for me and I have: MSFL1_GetErrorMessage Lib "msfl91d"
I'd suggest try uninstall, reinstall, and make sure to try the sample app again and make sure you don't get any errors about missing files when you first open the project
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/19/2005(UTC) Posts: 2,995
Was thanked: 14 time(s) in 10 post(s)
|
Sorry, I'm not using the latest release of the MDK. The principle should be the same.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/28/2005(UTC) Posts: 276 Location: Salt Lake City, UT
|
g_stockman wrote:Sorry, I'm not using the latest release of the MDK. The principle should be the same.
Yes, 8 and 9.1 should be the same for this.
I tried 9.1 just to make sure there wasn't something wrong with our sample that was preventing this to work.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 1/30/2010(UTC) Posts: 1
|
I know this is a very old thread, but I am having exactly the same problem, and am hoping someone can help.
I am using the MDK with VB.NET. I converted the files myself from the VB sample, and I have almost everything working perfectly.
The only function that I seem to be unable to get right is the MSFL1_GetErrorMessage function which returns "The specified module could not be found" everytime I try to call it. I have discovered that this means that my declaration of the function in MSFL.vb is incorrect.
I have tried about 30 variations of the function declaration, and none of them seem to work. Can anyone help me with the correct function declaration from VB.Net?
The irony is that I've managed to get all the other functions to work correctly, and so it is hard to work why this particular function is wrong.
Here is the declaration I am using at the moment:
Declare Function MSFL1_GetErrorMessage Lib "msfl91d" (ByVal iErr As Integer, ByRef pszErrorMessage As String, ByVal wMaxMsgLength As Short) As String
I have tried :
- changing the iErr parameter to Long and Short
- making the pszErrorMessage parameter ByVal and ByRef.
- making the pszErrorMessage a string and a StringBuilder.
- having the wMaxMsgLength as a Short, Integer and even Long
- changing the return type of the function from String to Integer to Intptr and even String Builder
None of those changes have yielded success, and so I have run out of ideas.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 12/14/2009(UTC) Posts: 140 Location: Austria
|
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.