🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: [C++ Error] E2034 Cannot convert 'int' to 'void *'

#4340
From: Bob Gonder
Date: Fri, 17 Feb 2006 23:17
21 lines
1900 bytes
Michael Gillen wrote:

>> BYTE bBuffer[BUFFER_SIZE]={0};
>> PEVENTLOGRECORD rec=(PEVENTLOGRECORD)&bBuffer;

bBuffer is the address of bBuffer[], so your assignment is not right.

>>   if (!ReadEventLog( logHandle,
>>                 EVENTLOG_BACKWARDS_READ  | EVENTLOG_SEQUENTIAL_READ,
>>                 0,
	bBuffer, // <-- this should work
>>                 BUFFER_SIZE,
>>                 &nBytesRead,
>>                 &nBytesRequired)) {

>[C++ Error] OSEvent.cpp(64): E2034 Cannot convert 'int' to 'void *'
>[C++ Error] OSEvent.cpp(64): E2342 Type mismatch in parameter 'hEventLog' (wanted 'void *', got
>'int')

The real problem is the handle 'hEventLog',  or 'logHandle' in your
code, which apparently isn't a HANDLE.
Technical Details
Message-ID: <rmlcv158ilhtjngdeos1s3c442t27j6fai@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!news-raspail.gip.net!news.gsl.net!gip.net!grolier!194.74.65.66.MISMATCH!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43f616d2$1@newsgroups.borland.com> <43f62100$1@newsgroups.borland.com> <43f64fd9@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,8ec6b60facd951bc
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: [C++ Error] E2034 Cannot convert 'int' to 'void *'
Date: Fri, 17 Feb 2006 15:17:20 -0800
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <rmlcv158ilhtjngdeos1s3c442t27j6fai@4ax.com>
References: <43f616d2$1@newsgroups.borland.com> <43f62100$1@newsgroups.borland.com> <43f64fd9@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: 71.49.210.255
X-Trace: newsgroups.borland.com 1140217998 71.49.210.255 (17 Feb 2006 15:13:18 -0700)
Lines: 24
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!news-raspail.gip.net!news.gsl.net!gip.net!grolier!194.74.65.66.MISMATCH!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail