🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #8398

Re: Problem accessing function in DLL

#8398
From: Bob Gonder
Date: Thu, 28 Oct 2004 15:21
23 lines
1868 bytes
Anders Johansen wrote:

>I am trying to access a function in oleacc.dll using
>LoadLibrary and GetProcAddress, but for some reason it
>doesn't work. 
>
>Can someone point out the error?
>
>The function I am going for (GetRoleText) should be a part
>of the oleacc.dll on my machine (WinXP).

First thing you should do when you are confronted with this type of
problem, is look in the actual dll for the function. Had you done so,
you would have seen that GetRoleText doesn't exist.
There is, however a GetRoleTextA and a GetRoleTextW.

Another clue to this would be to look in the headers where GetRoleText
is defined.
 There you would see that it is defined as GetRoleTextA or W,
depending on the default size of your chars.

Windows has many functions defined this way, so always check for A/W
versions if there is text involved.
Technical Details
Message-ID: <a432o0h5pedjjucakgmcq15r5f4j4e8jss@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.wirehub.nl!194.72.7.126.MISMATCH!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4180f707$3@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4fc3141b3a957dd3
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Problem accessing function in DLL
Date: Thu, 28 Oct 2004 08:21:30 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <a432o0h5pedjjucakgmcq15r5f4j4e8jss@4ax.com>
References: <4180f707$3@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 69.69.90.169
X-Trace: newsgroups.borland.com 1098976891 69.69.90.169 (28 Oct 2004 08:21:31 -0700)
Lines: 26
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.wirehub.nl!194.72.7.126.MISMATCH!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail