Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

API

Posted on 1998-09-22
4
Medium Priority
?
184 Views
Last Modified: 2010-04-30
Hi Experts,

  I wish to know why did the error below occured :)
  - can't find Dll entry point GetProfileString in Kernel32

  GetProfileString is a Function delare with :)

 declare function GetProfileString Lib "Kernel32" ( byval Sname as string, byval Kname as string, byval Def as string, byval Ret as string, byVal size )as integer


 How can I fix this problem ?

thanks



SWP
0
Comment
Question by:SWP
  • 2
4 Comments
 

Author Comment

by:SWP
ID: 1436156
Edited text of question
0
 
LVL 1

Accepted Solution

by:
movieguy earned 300 total points
ID: 1436157
Try this declaration.  This is the way I have it declared and it works for me.

Declare Function GetProfileString Lib "kernel32" Alias "GetProfileStringA" (ByVal lpAppName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long) As Long

0
 
LVL 15

Expert Comment

by:Eyal
ID: 1436158
You have an addin for this in VB. Add it by Addin manager.

0
 

Author Comment

by:SWP
ID: 1436159
Yes, You had answered my quetion. Thank you.

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question