🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
2 messages
2 total messages Started by Michael Gillen Sat, 11 Aug 2007 18:51
Ambiguity between 'PHKEY' and 'Windows::PHKEY'
#1480
Author: Michael Gillen
Date: Sat, 11 Aug 2007 18:51
38 lines
1742 bytes
C++ Builder 2007

I'm getting this error.

[BCC32 Error] cfgmgr32.h(2548): E2015 Ambiguity between 'PHKEY' and 'Windows::PHKEY'

Source.

*******************************************
include <vcl.h>
#pragma hdrstop
#include <cfgmgr32.h>  // Here is the trouble maker

#include "Main.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TFrmMain *FrmMain;
//---------------------------------------------------------------------------
__fastcall TFrmMain::TFrmMain(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall EnumerateUSBDevices()
{
  DEVINST DevInst=0; // Causes the error.
}
*******************************************

How do I fix it?

Thanks,
-- 
-Michael Gillen
Hollister, CA
UTC/GMT -8
Re: Ambiguity between 'PHKEY' and 'Windows::PHKEY'
#1481
Author: Steve
Date: Sat, 11 Aug 2007 20:20
30 lines
1810 bytes
"Michael Gillen" <michael@gillenconsultinggroup-nospam.com> ha scritto nel 
messaggio news:46be054a$1@newsgroups.borland.com...
>
> C++ Builder 2007
>
> I'm getting this error.
>
> [BCC32 Error] cfgmgr32.h(2548): E2015 Ambiguity between 'PHKEY' and 
> 'Windows::PHKEY'
>

I do not have C++ Builder 2007 installed, but I've same error (for other 
include file) many times in the past with Builder 6.

BEFORE do this, do a copy of "cfgmgr32.h" so you take an original version.

Then in the file cfgmgr.h try to put "::" (without quote) in front of the 
declaration of PHKEY, something like this:

::PHKEY

Try to complile and if the same problem is show in another line ... do the 
same thing ... until all is ok.

I'm sure there's other most elegant way to solve, but this normally works, 
and don't produce any strange effect.

Bye,
Steve
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads