[program-l] Re: Porting VC6 to VC 2008

  • From: "Tim Burgess" <tim@xxxxxxxxxxxxx>
  • To: <program-l@xxxxxxxxxxxxx>
  • Date: Wed, 19 May 2010 23:31:11 +0100

OK, now I've found the real catch.

I need to be able to edit my resources and I'm not allowed to using the
Express version of the product.  Looks like my freeware project is about to
cost me a few quid.

Best wishes.

Tim Burgess
Raised Bar Ltd
Phone:  +44 (0)1827 719822
Mobile:  07989 486976
Web:  http://www.raisedbar.net
Facebook:
http://www.facebook.com/pages/Atherstone-United-Kingdom/Raised-Bar-Ltd/12023
4896800

Don't forget to vote for improved access to music and music technology at

http://www.raisedbar.net/petition.htm
 

-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx [mailto:program-l-bounce@xxxxxxxxxxxxx]
On Behalf Of Soronel Haetir
Sent: 19 May 2010 14:47
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Re: Porting VC6 to VC 2008

Another technique is to not name the parameter when you define the function.

void MyCallback(UINT Param1, UINT /*Param2*/) {
...
}

That's not legal in C BTW, but it's fine in c++.  I generally consider
it better to at least put the parameter in a comment like the above so
if you ever do need it the use is perhaps a bit more apparent.

Also, in line with Mark's reply, if you want to be even more explicit
you can use the UNREFERENCED_PARAMETER macro:

void MyCallback(UINT Param1, UINT Param2) {
  UNREFERENCED_PARAMETER(Param2);
...
}

On 5/19/10, Mark Long <markalong64@xxxxxxxxxxx> wrote:
>
> The most common technique is to just reference it with a line that reads:
> dwParam2;
> That returns the address of the parameter and then discards ir - and the
> optimiser takes it out so it has no effect on the executing code.
> Thanks
> Mark
>
>> From: tim@xxxxxxxxxxxxx
>> To: program-l@xxxxxxxxxxxxx
>> Subject: [program-l] Porting VC6 to VC 2008
>> Date: Wed, 19 May 2010 12:16:12 +0100
>>
>> Hi,
>>
>> I'd better put my hand up and admit that I now see why everybody was
>> telling
>> me to junk my VS6 and move into the 21st century (possibly the century of
>> the fruit bat) - 2008 has found issues that were completely missed by the
>> older compiler and I've pretty much worked my way through them.  However,
>> I'm getting a couple of warnings like:
>>
>> warning C4100: 'dwParam2' : unreferenced formal parameter
>>
>> I can see that passing a parameter that's never used would be undesirable
>> and I've cleaned up a few function headers to avoid doing this.  However,
>> my
>> remaining instances of this warning happen at the top of callback
>> routines,
>> where the format of the function header is set by the template in
>> windows.h,
>> or similar.  The example here is encountered at the top of a MIDI
callback
>> routine.
>>
>> What's my best method for coping with this situation?  I've got my
>> environment with the value of 4 for treating warnings as errors and it
>> would
>> be easy enough to reduce this, but is there a better way?
>>
>> Best wishes.
>>
>> Tim Burgess
>> Raised Bar Ltd
>> Phone:  +44 (0)1827 719822
>> Mobile:  07989 486976
>> Web:  http://www.raisedbar.net
>> Facebook:
>>
http://www.facebook.com/pages/Atherstone-United-Kingdom/Raised-Bar-Ltd/12023
>> 4896800
>>
>> Don't forget to vote for improved access to music and music technology at
>>
>> http://www.raisedbar.net/petition.htm
>>
>>
>> -----Original Message-----
>> From: program-l-bounce@xxxxxxxxxxxxx
>> [mailto:program-l-bounce@xxxxxxxxxxxxx]
>> On Behalf Of Soronel Haetir
>> Sent: 18 May 2010 20:48
>> To: program-l
>> Subject: [program-l] Re: c++ and XML
>>
>> The wp64 message is controlled on the project properties -> C/C++ ->
>> General page (Detect 64 bit portability issues).
>>
>> I just turn that one off now, but leave warning level at 4 and
>> warnings as errors.
>>
>> I would have to see what exactly you're doing that would make it
>> complain about DWORD, the size of a DWORD has not changed in win64.
>>
>>
>> On 5/18/10, Tim Burgess <tim@xxxxxxxxxxxxx> wrote:
>> > OK,
>> >
>> > I've taken the cumulative hints and brought my code into a new VC++
2008
>> > project using Win32.  I built the project and was gratified to find
that
>> it
>> > didn't bring up anything too alarming and actually spotted some
mistakes
>> VS6
>> > had missed.  The only warnings I'm getting that aren't making sense to
>> > me
>> > are as follows:
>> >
>> > 1>cl : Command line warning D9035 : option 'Wp64' has been deprecated
>> > and
>> > will be removed in a future release
>> >
>> > I assume I can actually ignore this one for the time being, but I also
>> > get
>> a
>> > lot of warnings about pointer size mismatches whenever I've used the
>> > DWORD
>> > type (I need to use this a lot because of the MIDI components in my
>> > application).  I can't see any references in the upgrade notes to
>> > indicate
>> > that the length of a DWORD has been changed - can anybody shed any
>> > light,
>> > please?
>> >
>> > Best wishes.
>> >
>> > Tim Burgess
>> > Raised Bar Ltd
>> > Phone:  +44 (0)1827 719822
>> > Mobile:  07989 486976
>> > Web:  http://www.raisedbar.net
>> > Facebook:
>> >
>>
http://www.facebook.com/pages/Atherstone-United-Kingdom/Raised-Bar-Ltd/12023
>> > 4896800
>> >
>> > Don't forget to vote for improved access to music and music technology
>> > at
>> >
>> > http://www.raisedbar.net/petition.htm
>> >
>> >
>> > -----Original Message-----
>> > From: program-l-bounce@xxxxxxxxxxxxx
>> [mailto:program-l-bounce@xxxxxxxxxxxxx]
>> > On Behalf Of Soronel Haetir
>> > Sent: 18 May 2010 15:09
>> > To: program-l@xxxxxxxxxxxxx
>> > Subject: [program-l] Re: c++ and XML
>> >
>> > If you're willing to do some work building it I would expect libxml
>> > from *nix land to work.  I believe boost also has xml suppprt but I
>> > don't know how well it supports vc6 now.  I know boost folks used to
>> > work pretty hard to ensure that the library would work around vc's
>> > non-conformant behavior.
>> >
>> > All of that being said recent releases of VC (I would suggest sticking
>> > with 2k8 for the time being) are such a vast improvement that I would
>> > still suggest upgrading even if you stick with native win32.
>> >
>> > On 5/18/10, Tim Burgess <tim@xxxxxxxxxxxxx> wrote:
>> >> Hi,
>> >>
>> >> I have a suspicion that my VC6 code has just encountered an issue that
>> may
>> >> make me migrate the whole thing to .net.  I need to be able to read
and
>> >> write values to/from an XML file and the only library support I can
>> >> find
>> > is
>> >> based on the IXML object for Internet Explorer 4.
>> >>
>> >> Can anybody please advise me on a good XML library to use and whether
I
>> > can
>> >> keep this project in VC6, at least for this initial version?
>> >>
>> >>
>> >>
>> >> Best wishes.
>> >>
>> >> Tim Burgess
>> >> Raised Bar Ltd
>> >> Phone:  +44 (0)1827 719822
>> >> Mobile:  07989 486976
>> >> Web:  http://www.raisedbar.net
>> >> Facebook:
>> >>
>> >
>>
http://www.facebook.com/pages/Atherstone-United-Kingdom/Raised-Bar-Ltd/12023
>> >> 4896800
>> >>
>> >> Don't forget to vote for improved access to music and music technology
>> >> at
>> >>
>> >> http://www.raisedbar.net/petition.htm
>> >>
>> >>
>> >>
>> >
>> >
>> > --
>> > Soronel Haetir
>> > soronel.haetir@xxxxxxxxx
>> > ** To leave the list, click on the immediately-following link:-
>> > ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
>> > ** If this link doesn't work then send a message to:
>> > ** program-l-request@xxxxxxxxxxxxx
>> > ** and in the Subject line type
>> > ** unsubscribe
>> > ** For other list commands such as vacation mode, click on the
>> > ** immediately-following link:-
>> > ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
>> > ** or send a message, to
>> > ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
>> >
>> > ** To leave the list, click on the immediately-following link:-
>> > ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
>> > ** If this link doesn't work then send a message to:
>> > ** program-l-request@xxxxxxxxxxxxx
>> > ** and in the Subject line type
>> > ** unsubscribe
>> > ** For other list commands such as vacation mode, click on the
>> > ** immediately-following link:-
>> > ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
>> > ** or send a message, to
>> > ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
>> >
>>
>>
>> --
>> Soronel Haetir
>> soronel.haetir@xxxxxxxxx
>> ** To leave the list, click on the immediately-following link:-
>> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
>> ** If this link doesn't work then send a message to:
>> ** program-l-request@xxxxxxxxxxxxx
>> ** and in the Subject line type
>> ** unsubscribe
>> ** For other list commands such as vacation mode, click on the
>> ** immediately-following link:-
>> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
>> ** or send a message, to
>> ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
>>
>> ** To leave the list, click on the immediately-following link:-
>> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
>> ** If this link doesn't work then send a message to:
>> ** program-l-request@xxxxxxxxxxxxx
>> ** and in the Subject line type
>> ** unsubscribe
>> ** For other list commands such as vacation mode, click on the
>> ** immediately-following link:-
>> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
>> ** or send a message, to
>> ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
>                                       


-- 
Soronel Haetir
soronel.haetir@xxxxxxxxx
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts: