Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 48 trying to use a DLL

Status
Not open for further replies.

KenWK

Programmer
May 25, 2001
76
US
I am trying to use API calls in the ATM32.DLL that is part of Adobe Type Manager, the program that allows PostScript fonts to be used in Windows.

I am getting a Visual Basic error of 48 as described in the "Trappable Errors" topic of the VB help.

There are 5 "causes and solutions" listed but I'm not sure how to tell which may be the culprit.

The ATM32.DLL file doesn't appear to be "source-text file" so I have to assume it has been "compiled and linked to DLL executable form," I guess?

The other possible causes seem unlikely, although, I'm not even sure how to determine whether they are or not.

Anyone have any experience with this error?
 
Hi,
Has the DLL been registered to Windows? Use the command:
Regsvr32.exe <DLL NAME>
Also make sure all 5 things are correct. Here is what I found on it:
#1 and 2 could just mean the DLL is bad.
#3 could be caused if you are using Win NT or 2000.
#4 always gives me problems.
#5 would be fixed by registering the DLL.
I hope this helps!
Brett Please visit my websites!
 
If you are just calling an API and the DLL is not a COM server, you do not have to register it. Regsrv32 is used for registering COM servers. - Jeff Marler B-)
 
Well, I don't think the DLL is bad as the program is running on the system, and I would guess it must use the DLL all the time.

I'm in Win 98 so that shouldn't be the trouble.

I did a quick look on the system and didn't see any other possible DLLs, but that doesn't mean there isn't one somewhere I'm not looking.

I would guess, since ATM is running on this machine, that the DLL is registered. It also appears in the registry under the key &quot;SharedDLLs&quot;. And, given Jeff's comment, I don't think using Regsrv32 is my answer.

Thanks for feedback! More is always welcome.
 
Ken -

Could you please post a short test piece of source code illustrating how you are calling it? Include the Declare statement if it's a non-COM dll.

Thanks.
Chip H.

 
At present I'm trying to use 3 routines within the ATM32.DLL, ATMBeginFontChange, ATMEndFontChange and ATMAddFont. I'm not even sure where to go from here. I'm about to re-read the documentation from Adobe to make sure I hadn't missed anything.

The documentation from Adobe shows the following:

extern int ATMAPI ATMBeginFontChange (void);

extern int ATMAPI ATMEndFontChange(void);

extern int ATMAPI ATMAddFont (
LPSTR lpMenuName,
WORD styleAndType,
LPSTR lpMetricsFile,
LPSTR lpFontFile);

I've declared the functions as shown here:

Declare Function ATMBeginFontChange Lib &quot;ATM32&quot; () As Integer
Declare Function ATMEndFontChange Lib &quot;ATM32&quot; () As Integer

Declare Function ATMAddFont Lib &quot;ATM32&quot; (ByVal lpMenuName As String, ByVal styleAndType As Long, ByVal lpMetricsFile As String, ByVal lpFontFile As String) As Long

Calling the API's as here:

pfmname$ = &quot;g:\psfonts\pfm\0121a___.pfm&quot;
pfbname$ = &quot;g:\psfonts\0121a___.pfb&quot;
answ1 = Module1.ATMBeginFontChange()
answ2 = Module1.ATMAddFont(&quot;Balloon Lt BT&quot;, 0, pfmname$, pfbname$)
answ3 = Module1.ATMEndFontChange()

pfmname$ and pfbname$ are the names of PostScript Type 1 font files.

The two documents from Adboe that I'm using are:
and

As you can see these documents take a while to download to the browser, I can email them to you if you think they may be helpful. The 2nd is a companion document to the 1st that shows only the 32 bit info.

Thanks for having a look!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top