Article View: borland.public.cppbuilder.nativeapi
Article #4339Re: [C++ Error] E2034 Cannot convert 'int' to 'void *'
From: Michael Gillen
Date: Fri, 17 Feb 2006 21:36
Date: Fri, 17 Feb 2006 21:36
31 lines
1866 bytes
1866 bytes
Darko Miletic wrote:
> More appropriate code would be like this:
>
> BYTE bBuffer[BUFFER_SIZE]={0};
> PEVENTLOGRECORD rec=(PEVENTLOGRECORD)&bBuffer;
> DWORD nBytesRead;
> DWORD nBytesRequired;
>
> if (!ReadEventLog( logHandle,
> EVENTLOG_BACKWARDS_READ | EVENTLOG_SEQUENTIAL_READ,
> 0,
> rec,
> BUFFER_SIZE,
> &nBytesRead,
> &nBytesRequired)) {
> //do something
> }
Thank you for the clean up. I had used the previous code in an old BCB6 project (I got it from a
microsoft based web site several years ago).
However, the above code has the same problem in BDS2006. - Compiles in BCB6. Compiler bug?
--
[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')
--
-Michael Gillen
Technical Details
Message-ID:
<43f64fd9@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!news.glorb.com!news.agarik.com!grolier!194.74.65.66.MISMATCH!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43f616d2$1@newsgroups.borland.com> <43f62100$1@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: "Michael Gillen" <michael@gillenconsultinggroup-nospam.com> Subject: Re: [C++ Error] E2034 Cannot convert 'int' to 'void *' Newsgroups: borland.public.cppbuilder.nativeapi References: <43f616d2$1@newsgroups.borland.com> <43f62100$1@newsgroups.borland.com> User-Agent: XanaNews/1.17.6.6 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 NNTP-Posting-Host: 67.122.199.249 Message-ID: <43f64fd9@newsgroups.borland.com> Date: 17 Feb 2006 14:36:09 -0700 X-Trace: newsgroups.borland.com 1140215769 67.122.199.249 (17 Feb 2006 14:36:09 -0700) Lines: 31 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!news.glorb.com!news.agarik.com!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