[2155]Wrong "Parameter not used" warning???

I'm working with VB on VS 2010. In my solution i have to use dll's written in C++ to access the database. Therefore i declare some P/Invoke methods in my data access layer. To hide the implementation details i declare them private, for example

        Private Declare Function AW80_AW80T030TabelleLesen Lib "AW80_SapBIExport32.dll" (ByRef pTransferRecord As AW80T030) As Integer


R# generates the warning "parameter 'pTransferRecord' is never used". pTransferRecord is a private Structure i defined in the same class. Later in the code i use the function definition like this:

            Dim transferRecord As New AW80T030()

            transferRecord.Monat = BewertungsdatumMonat.ToCharArray()
            transferRecord.Jahr = BewertungsdatumJahr.ToCharArray()
            transferRecord.VersionNr = pVersion

            Dim result = AW80_AW80T030TabelleLesen(transferRecord)

So why do R# generates the warning?

Regards
Klaus

1 comment

Hello Klaus,

Thank you for reporting this problem! I've logged it in our tracker: http://youtrack.jetbrains.net/issue/RSRP-270912.


Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I'm working with VB on VS 2010. In my solution i have to use dll's
written in C++ to access the database. Therefore i declare some
P/Invoke methods in my data access layer. To hide the implementation
details i declare them private, for example

Private Declare Function AW80_AW80T030TabelleLesen Lib
"AW80_SapBIExport32.dll" (ByRef pTransferRecord As AW80T030) As
Integer

R# generates the warning "parameter 'pTransferRecord' is never used".
pTransferRecord is a private Structure i defined in the same class.
Later in the code i use the function definition like this:

Dim transferRecord As New AW80T030()

transferRecord.Monat = BewertungsdatumMonat.ToCharArray()
transferRecord.Jahr = BewertungsdatumJahr.ToCharArray()
transferRecord.VersionNr = pVersion
Dim result = AW80_AW80T030TabelleLesen(transferRecord)

---
Original message URL:
http://devnet.jetbrains.net/message/5305473#5305473



0

Please sign in to leave a comment.