|
Mark Salsbery wrote: Nah
You're right.
Mark Salsbery wrote: Maybe in VC6...
Nope. Also VC6 compiles fine with TCHAR.h alone.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi all,
I want to create a file in vista(UAC Enabled) using CreateFile() API. But the problem is its not creating the file. Using GetLastError() is returning 5. How can i create the file in vista(UAC Enabled).
Thanks in advance..
|
|
|
|
|
You are probably trying to create the file in the same folder as your application (which is in Program Files). Under Vista, this requires admin privilege.
Instead you should store your data in the appdata folder. Take a look at SHGetFolderPath[^] using the CSIDL of CSIDL_APPDATA or CSIDL_LOCAL_APPDATA.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
If you take a look at the System Error Codes, error code 5 is ERROR_ACCESS_DENIED , which means what it says on the tin.
If you are writing to a restricted directory, you will need to elevate your process prior to writing to it.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
#pragma check_stack([ {on | off}] ) is used to know stack overflow. How it will report stack overflow ? I tried with on and off switch for a function f1(). it gives same error.
How and where this pragma can be useful ?
#pragma check_stack(on) // Tried with both on and off . both gives stack overflow.
__int64 f1(__int64 a);
__int64 f1(__int64 a)
{
if((a-1)==0)
return 1;
return a*f1(a-1);
}
int main()
{
printf("\nInside Main");
printf("\n%ld\n",f1(99999));
}
|
|
|
|
|
You're going to get a stack overflow no matter what settings you use.
That isn't something that can just be reported. There's no safe way
for the process to continue.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi Mark,
Thanks for responding.
But than why this #pragma check_stack exsists ? what is the use of this ?
Alok
|
|
|
|
|
Alok Chauhan wrote: why this #pragma check_stack exsists ?
To control stack probing (see /Gs (Control Stack Checking Calls)[^]).
This applies to stack frames[^] set up for function calls, not to recursive
function calls running off the end of the stack.
As mentioned in the /Gs docs (linked to above), you need a stack frame for a given
function that is at least 4KB (on x86 platform) for stack probing to have an effect.
Try changing your function to make a big stack frame and you'll see - it will
still fault because of the recursion, but it will happen in the stack probing code when
there's no more stack to automagically allocate for the function call:
#pragma check_stack(on)
_int64 f1(__int64 a)
{
char arr[5000];
if((a-1)==0)
return 1;
return a*f1(a-1);
}
This is a pretty advanced topic, and the default settings work
well for Windows - what are you trying to do?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Please send to me a Btree library which written by C++ or C#. I need it for my program. Thanks. My email phap007@yahoo.com
|
|
|
|
|
|
plz send me money or drugz: me@cpallini.com
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Why I must be give you money when I can use of your site freely?
|
|
|
|
|
Shhhhhhhhhhhhhhh!
You're such a smart guy, Hamid.
BTW welcome in THHB (T hread H ijacking H appy B rigade)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: BTW welcome in THHB (Thread Hijacking Happy Brigade)
You and me and Rajesh I think ,btw you invited me previous do you remember?
|
|
|
|
|
|
But I think yeah .
|
|
|
|
|
Hello everyone,
I am using x64 machine with x64 binary, built with VC 2008 debug version and run on Windows Server 2003. Using x64 version Windbg as well.
The weird issue is, when I use bp command to set a breakpoint to main method, there will be symbol load error. I show both the debugger output and source code as well.
But if I comment some lines of main function, there is no symbol load error for the same bp command. So weird, any ideas? Are there actually any symbol missing?
0:000> bp main
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\WINDOWS\WinSxS\amd64_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_2A6DACFF\MSVCP90D.dll -
#include <iostream>
#include <assert.h>
#include <windows.h>
using namespace std;
int foo()
{
int b = 300;
return b;
}
int goo()
{
int a = 400;
return a;
}
int main()
{
int a = 200;
void** b1 = (void**)&a;
void* b2 = *b1;
int b3 = (int)*b1;
cout << (void*)b2 << endl;
cout << (void*)b3 << endl;
return 0;
}
int main()
{
int a = 200;
return 0;
}
thanks in advance,
George
|
|
|
|
|
hi,every body,I want to write a real-time-transfer app,and I want to use jrtplib,I had downloaded free lib 'jrtplib-3.7.1' and 'jthread-1.2.1',but I don't know how to generate the lib files correctly,It always show me a lot of 'warnings'(33) as bellow,every one who had handle those problem can show me the way step by step to carry it out?
thinks in advance.
Deleting intermediate files and output files for project 'jrtplib - Win32 Debug'.
--------------------Configuration: jrtplib - Win32 Debug--------------------
Compiling...
rtcpapppacket.cpp
rtcpbyepacket.cpp
rtcpcompoundpacket.cpp
rtcpcompoundpacketbuilder.cpp
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPCompoundPacketBuilder::Buffer,std::allocator<RTCPCompoundPacketBuilder::Buffer> >::const_iterator,RTCPCompoundPacketB
uilder::Buffer,RTCPCompoundPacketBuilder::Buffer const &,RTCPCompoundPacketBuilder::Buffer const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPCompoundPacketBuilder::Buffer,std::allocator<RTCPCompoundPacketBuilder::Buffer> >::std::list<RTCPCompo
undPacketBuilder::Buffer,std::allocator<RTCPCompoundPacketBuilder::Buffer> >(const std::allocator<RTCPCompoundPacketBuilder::Buffer> &)'
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::iterator,RTCPCompoundP
acketBuilder::SDESSource *,RTCPCompoundPacketBuilder::SDESSource * &,RTCPCompoundPacketBuilder::SDESSource * *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::std::li
st<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >(const std::allocator<RTCPCompoundPacketBuilder::SDESSource *> &)'
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::const_iterator,RTCPCom
poundPacketBuilder::SDESSource *,RTCPCompoundPacketBuilder::SDESSource * const &,RTCPCompoundPacketBuilder::SDESSource * const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::std::li
st<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >(const std::allocator<RTCPCompoundPacketBuilder::SDESSource *> &)'
rtcppacket.cpp
rtcppacketbuilder.cpp
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPSDESInfo::SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >::const_iterator,RTCPSDESInfo::SDESPriva
teItem *,RTCPSDESInfo::SDESPrivateItem * const &,RTCPSDESInfo::SDESPrivateItem * const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPSDESInfo::SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >::std::list<RTCPSDESInfo:
:SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >(const std::allocator<RTCPSDESInfo::SDESPrivateItem *> &)'
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPCompoundPacketBuilder::Buffer,std::allocator<RTCPCompoundPacketBuilder::Buffer> >::const_iterator,RTCPCompoundPacketB
uilder::Buffer,RTCPCompoundPacketBuilder::Buffer const &,RTCPCompoundPacketBuilder::Buffer const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPCompoundPacketBuilder::Buffer,std::allocator<RTCPCompoundPacketBuilder::Buffer> >::std::list<RTCPCompo
undPacketBuilder::Buffer,std::allocator<RTCPCompoundPacketBuilder::Buffer> >(const std::allocator<RTCPCompoundPacketBuilder::Buffer> &)'
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::iterator,RTCPCompoundP
acketBuilder::SDESSource *,RTCPCompoundPacketBuilder::SDESSource * &,RTCPCompoundPacketBuilder::SDESSource * *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::std::li
st<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >(const std::allocator<RTCPCompoundPacketBuilder::SDESSource *> &)'
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::const_iterator,RTCPCom
poundPacketBuilder::SDESSource *,RTCPCompoundPacketBuilder::SDESSource * const &,RTCPCompoundPacketBuilder::SDESSource * const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::std::li
st<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >(const std::allocator<RTCPCompoundPacketBuilder::SDESSource *> &)'
rtcprrpacket.cpp
rtcpscheduler.cpp
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPSDESInfo::SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >::const_iterator,RTCPSDESInfo::SDESPriva
teItem *,RTCPSDESInfo::SDESPrivateItem * const &,RTCPSDESInfo::SDESPrivateItem * const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPSDESInfo::SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >::std::list<RTCPSDESInfo:
:SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >(const std::allocator<RTCPSDESInfo::SDESPrivateItem *> &)'
rtcpsdesinfo.cpp
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPSDESInfo::SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >::const_iterator,RTCPSDESInfo::SDESPriva
teItem *,RTCPSDESInfo::SDESPrivateItem * const &,RTCPSDESInfo::SDESPrivateItem * const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPSDESInfo::SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >::std::list<RTCPSDESInfo:
:SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >(const std::allocator<RTCPSDESInfo::SDESPrivateItem *> &)'
rtcpsdespacket.cpp
rtcpsrpacket.cpp
rtpcollisionlist.cpp
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTPCollisionList::AddressAndTime,std::allocator<RTPCollisionList::AddressAndTime> >::const_iterator,RTPCollisionList::Add
ressAndTime,RTPCollisionList::AddressAndTime const &,RTPCollisionList::AddressAndTime const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTPCollisionList::AddressAndTime,std::allocator<RTPCollisionList::AddressAndTime> >::std::list<RTPCollisio
nList::AddressAndTime,std::allocator<RTPCollisionList::AddressAndTime> >(const std::allocator<RTPCollisionList::AddressAndTime> &)'
rtpdebug.cpp
rtperrors.cpp
rtpinternalsourcedata.cpp
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPSDESInfo::SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >::const_iterator,RTCPSDESInfo::SDESPriva
teItem *,RTCPSDESInfo::SDESPrivateItem * const &,RTCPSDESInfo::SDESPrivateItem * const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPSDESInfo::SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >::std::list<RTCPSDESInfo:
:SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >(const std::allocator<RTCPSDESInfo::SDESPrivateItem *> &)'
rtpipv4address.cpp
rtpipv6address.cpp
rtplibraryversion.cpp
rtppacket.cpp
rtppacketbuilder.cpp
rtppollthread.cpp
c:\program files\microsoft visual studio\vc98\include\list(153) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTPCollisionList::AddressAndTime,std::allocator<RTPCollisionList::AddressAndTime> >::const_iterator,RTPCollisionList::Add
ressAndTime,RTPCollisionList::AddressAndTime const &,RTPCollisionList::AddressAndTime const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(151) : while compiling class-template member function '__thiscall std::list<RTPCollisionList::AddressAndTime,std::allocator<RTPCollisionList::AddressAndTime> >::~std::list<RTPCollisi
onList::AddressAndTime,std::allocator<RTPCollisionList::AddressAndTime> >(void)'
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPSDESInfo::SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >::const_iterator,RTCPSDESInfo::SDESPriva
teItem *,RTCPSDESInfo::SDESPrivateItem * const &,RTCPSDESInfo::SDESPrivateItem * const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPSDESInfo::SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >::std::list<RTCPSDESInfo:
:SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >(const std::allocator<RTCPSDESInfo::SDESPrivateItem *> &)'
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPCompoundPacketBuilder::Buffer,std::allocator<RTCPCompoundPacketBuilder::Buffer> >::const_iterator,RTCPCompoundPacketB
uilder::Buffer,RTCPCompoundPacketBuilder::Buffer const &,RTCPCompoundPacketBuilder::Buffer const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPCompoundPacketBuilder::Buffer,std::allocator<RTCPCompoundPacketBuilder::Buffer> >::std::list<RTCPCompo
undPacketBuilder::Buffer,std::allocator<RTCPCompoundPacketBuilder::Buffer> >(const std::allocator<RTCPCompoundPacketBuilder::Buffer> &)'
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::iterator,RTCPCompoundP
acketBuilder::SDESSource *,RTCPCompoundPacketBuilder::SDESSource * &,RTCPCompoundPacketBuilder::SDESSource * *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::std::li
st<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >(const std::allocator<RTCPCompoundPacketBuilder::SDESSource *> &)'
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::const_iterator,RTCPCom
poundPacketBuilder::SDESSource *,RTCPCompoundPacketBuilder::SDESSource * const &,RTCPCompoundPacketBuilder::SDESSource * const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::std::li
st<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >(const std::allocator<RTCPCompoundPacketBuilder::SDESSource *> &)'
rtprandom.cpp
rtpsession.cpp
e:\vs\vc\网络视频\jrtplib-3.7.1\jrtplib-3.7.1\src\rtpsession.cpp(81) : warning C4355: 'this' : used in base member initializer list
c:\program files\microsoft visual studio\vc98\include\list(153) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTPCollisionList::AddressAndTime,std::allocator<RTPCollisionList::AddressAndTime> >::const_iterator,RTPCollisionList::Add
ressAndTime,RTPCollisionList::AddressAndTime const &,RTPCollisionList::AddressAndTime const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(151) : while compiling class-template member function '__thiscall std::list<RTPCollisionList::AddressAndTime,std::allocator<RTPCollisionList::AddressAndTime> >::~std::list<RTPCollisi
onList::AddressAndTime,std::allocator<RTPCollisionList::AddressAndTime> >(void)'
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPSDESInfo::SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >::const_iterator,RTCPSDESInfo::SDESPriva
teItem *,RTCPSDESInfo::SDESPrivateItem * const &,RTCPSDESInfo::SDESPrivateItem * const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPSDESInfo::SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >::std::list<RTCPSDESInfo:
:SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >(const std::allocator<RTCPSDESInfo::SDESPrivateItem *> &)'
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPCompoundPacketBuilder::Buffer,std::allocator<RTCPCompoundPacketBuilder::Buffer> >::const_iterator,RTCPCompoundPacketB
uilder::Buffer,RTCPCompoundPacketBuilder::Buffer const &,RTCPCompoundPacketBuilder::Buffer const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPCompoundPacketBuilder::Buffer,std::allocator<RTCPCompoundPacketBuilder::Buffer> >::std::list<RTCPCompo
undPacketBuilder::Buffer,std::allocator<RTCPCompoundPacketBuilder::Buffer> >(const std::allocator<RTCPCompoundPacketBuilder::Buffer> &)'
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::iterator,RTCPCompoundP
acketBuilder::SDESSource *,RTCPCompoundPacketBuilder::SDESSource * &,RTCPCompoundPacketBuilder::SDESSource * *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::std::li
st<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >(const std::allocator<RTCPCompoundPacketBuilder::SDESSource *> &)'
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::const_iterator,RTCPCom
poundPacketBuilder::SDESSource *,RTCPCompoundPacketBuilder::SDESSource * const &,RTCPCompoundPacketBuilder::SDESSource * const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::std::li
st<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >(const std::allocator<RTCPCompoundPacketBuilder::SDESSource *> &)'
rtpsessionparams.cpp
rtpsessionsources.cpp
c:\program files\microsoft visual studio\vc98\include\list(153) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTPCollisionList::AddressAndTime,std::allocator<RTPCollisionList::AddressAndTime> >::const_iterator,RTPCollisionList::Add
ressAndTime,RTPCollisionList::AddressAndTime const &,RTPCollisionList::AddressAndTime const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(151) : while compiling class-template member function '__thiscall std::list<RTPCollisionList::AddressAndTime,std::allocator<RTPCollisionList::AddressAndTime> >::~std::list<RTPCollisi
onList::AddressAndTime,std::allocator<RTPCollisionList::AddressAndTime> >(void)'
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPSDESInfo::SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >::const_iterator,RTCPSDESInfo::SDESPriva
teItem *,RTCPSDESInfo::SDESPrivateItem * const &,RTCPSDESInfo::SDESPrivateItem * const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPSDESInfo::SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >::std::list<RTCPSDESInfo:
:SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >(const std::allocator<RTCPSDESInfo::SDESPrivateItem *> &)'
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPCompoundPacketBuilder::Buffer,std::allocator<RTCPCompoundPacketBuilder::Buffer> >::const_iterator,RTCPCompoundPacketB
uilder::Buffer,RTCPCompoundPacketBuilder::Buffer const &,RTCPCompoundPacketBuilder::Buffer const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPCompoundPacketBuilder::Buffer,std::allocator<RTCPCompoundPacketBuilder::Buffer> >::std::list<RTCPCompo
undPacketBuilder::Buffer,std::allocator<RTCPCompoundPacketBuilder::Buffer> >(const std::allocator<RTCPCompoundPacketBuilder::Buffer> &)'
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::iterator,RTCPCompoundP
acketBuilder::SDESSource *,RTCPCompoundPacketBuilder::SDESSource * &,RTCPCompoundPacketBuilder::SDESSource * *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::std::li
st<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >(const std::allocator<RTCPCompoundPacketBuilder::SDESSource *> &)'
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::const_iterator,RTCPCom
poundPacketBuilder::SDESSource *,RTCPCompoundPacketBuilder::SDESSource * const &,RTCPCompoundPacketBuilder::SDESSource * const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >::std::li
st<RTCPCompoundPacketBuilder::SDESSource *,std::allocator<RTCPCompoundPacketBuilder::SDESSource *> >(const std::allocator<RTCPCompoundPacketBuilder::SDESSource *> &)'
rtpsourcedata.cpp
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPSDESInfo::SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >::const_iterator,RTCPSDESInfo::SDESPriva
teItem *,RTCPSDESInfo::SDESPrivateItem * const &,RTCPSDESInfo::SDESPrivateItem * const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPSDESInfo::SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >::std::list<RTCPSDESInfo:
:SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >(const std::allocator<RTCPSDESInfo::SDESPrivateItem *> &)'
rtpsources.cpp
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<RTCPSDESInfo::SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >::const_iterator,RTCPSDESInfo::SDESPriva
teItem *,RTCPSDESInfo::SDESPrivateItem * const &,RTCPSDESInfo::SDESPrivateItem * const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(129) : while compiling class-template member function '__thiscall std::list<RTCPSDESInfo::SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >::std::list<RTCPSDESInfo:
:SDESPrivateItem *,std::allocator<RTCPSDESInfo::SDESPrivateItem *> >(const std::allocator<RTCPSDESInfo::SDESPrivateItem *> &)'
rtptimeutilities.cpp
rtpudpv4transmitter.cpp
e:\vs\vc\网络视频\jrtplib-3.7.1\jrtplib-3.7.1\src\rtpudpv4transmitter.cpp(523) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char
,std::char_traits<char>,std::allocator<char> > > >::iterator,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> > &,std::basic_string<char,std::char_traits<char>,st
d::allocator<char> > *,int>' : identifier was truncated to '255' characters in the debug information
e:\vs\vc\网络视频\jrtplib-3.7.1\jrtplib-3.7.1\src\rtpudpv4transmitter.cpp(523) : warning C4786: 'std::reverse_bidirectional_iterator<std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char
,std::char_traits<char>,std::allocator<char> > > >::const_iterator,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &,std::basic_string<char,std::char_tra
its<char>,std::allocator<char> > const *,int>' : identifier was truncated to '255' characters in the debug information
rtpudpv6transmitter.cpp
c:\program files\microsoft visual studio\vc98\include\list(131) : warning C4786: 'std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >:
:list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\list(153) : warning C4786: 'std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >:
:~list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >' : identifier was truncated to '255' characters in the debug information
Creating library...
jrtplib.lib - 0 error(s), 33 warning(s)
|
|
|
|
|
they are only warnings - nothing to worry about. You 'may' be able to remove them by putting
#pragma warning(disable: 4786)
in the header files, but its nothing to worry about .... its generated jrtplib.lib so go on and use it ..
'G'
|
|
|
|
|
Thanks so much
new problems come up after I including them,I can't find the functions and can't see any popup of classwizard,Is there any other details I need to pay attention to?
#include "RTPSession.h"
//......
#pragma comment(lib,"jrtplib.lib")
#pragma comment(lib,"jthread.lib")
|
|
|
|
|
you may need to tell the linker where the .lib's are ..
Project -> Settings -> Link (Tab) -> Input
'Additional Library Path' = wherever the libs are
not having used these before, and not being able to mind-read what you're getting, I cant think of any other issues...
if the project for jrtplib includes an example, get that to compile & execute first, then you'll have a working model to start with .. after that your own code should be easy
'g'
|
|
|
|
|
Hello everybody,
I hope anyone can help me w/ my question !!!
I am trying to create a Win32 C dll in visual C++ 2008 express edition and it is working fine but I am not able to tell visual C++ to export the appropriate functions w/ their real names (e.g. function GetCANdbClassVersion will be exported as _GetCANdbClassVersion@0).
I added the following .def file to my project but it seems to have no influence to the exported function name
LIBRARY "CANdbClass.dll"
EXPORTS
GetCANdbClassVersion
I have declared the function as follows in my project (.c and .h file):
extern "C" __declspec(dllexport) BSTR __stdcall GetCANdbClassVersion(void);
do I have to tell vc what to do w/ the .def file ?
what am I doing wrong ?
thanks in advance for your help !
ganralf
|
|
|
|
|
If you use __declspec(dllexport) you don't need a DEF file.
You can get rid of the __declspec(dllexport) and use a DEF file or
use __declspec(dllexport) and forget the DEF file.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
thanks Mark for your quick answer !
ok, I have deleted the .def file and now I am using only __declspec(dllexport) but the result dll still does not contain the "real" name.
I have defined the exported function as follows in a .cpp file
extern "C" __declspec(dllexport) BSTR __stdcall GetCANdbClassVersion(void)
{
return SysAllocStringByteLen((LPCSTR)CANDBCLASSVER, strlen((const char*)CANDBCLASSVER));
}
and the appropriate header part
extern "C" __declspec(dllexport) BSTR __stdcall GetCANdbClassVersion(void);
when I am viewing the result dll with dumpbin.exe I get the following result
Setting environment for using Microsoft Visual Studio 2008 x86 tools.
Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file D:\...\CANdbClass.dll
File Type: DLL
Section contains the following exports for CANdbClass.dll
00000000 characteristics
48F1B934 time date stamp Sun Oct 12 10:45:40 2008
0.00 version
1 ordinal base
1 number of functions
1 number of names
ordinal hint RVA name
1 0 00001000 _GetCANdbClassVersion@0 = _GetCANdbClassVersion@0
Summary
1000 .data
1000 .rdata
1000 .reloc
1000 .rsrc
1000 .text
C:\Programme\Microsoft Visual Studio 9.0\VC>
is there anything I have forgotten to do ? Is it because I am using Express Edition ?
thanks for your help !
ganralf
|
|
|
|
|
__stdcall functions by default are exported with an appended underscore and
the @ sign followed by the number of arguments.
If you need to export an undecorated name, then maybe use a def file and get
rid of the __declspec(dllexport) (actually, if you leave it the DEF file export
will override it anyway). In the EXPORTS section of the DEF file,
use something like
EXPORTS
GetCANdbClassVersion
I tested this on a little Win32 DLL, which I configured to create a MAP file
at link time. In the map file I see this
4 _GetCANdbClassVersion@0
exported name: GetCANdbClassVersion
which I'm pretty sure is what you want.
You can also export both a decorated and an undecorated name, like this:
EXPORTS
GetCANdbClassVersion = _GetCANdbClassVersion@0
_GetCANdbClassVersion@0 = _GetCANdbClassVersion@0
What are your requirements?
I'm wondering why you're worried about the name decorations...
If your DLL will only be used by other modules built with Microsoft
tools, then using the __declspec(dllexport)/__declspec(dllimport)
method is the easiest way to go, since you can manage your imports/exports
right in the source code (generally at one place - where the functions are
declared). No need to worry about the decorations there.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|