Dear All,
I am using Win32 API.
Really i do not understand how to get the drive letter for DevicePath of a USB stick .
can you pls explain it to me
( what i have is SP_DEVICE_INTERFACE_DETAIL_DATA DevicePath
using this Device path i get VID AND PID of the usb device
my device path looks like below
"\?\usb#vid_1a8d&pid_1000#3580940...
I left a program running last night, it worked fine for about 5 hours and then one of its built-in self-diagnostic tests detected a problem and brought up a dialog box telling me the issue. The program was built with debug information (/Zi). Is it possible to somehow get the debugger started so I can examine the value of some variables w...
I have a Xerces (2.6) DOMNode object encoded UTF-8. I use to read its TEXT element like this:
CBuffer DomNodeExtended::getText( const DOMNode* node ) const {
char* p = XMLString::transcode( node->getNodeValue( ) );
CBuffer xNodeText( p );
delete p;
return xNodeText;
}
Where CBuffer is, well, just a buffer object which is latel...
I'm aware of tools in the Xcode utilities for monitoring and benchmarking applications, but I'd like to test a few different (low level) implementations of library components, preferably across osx/linux/windows. Is there any framework for code benchmarking, similar to say unit tests? I'd just like some convenient api functions to accura...
I use the following to work with arguments in my programs, but it seems to just hand me a warning (just a warning): "warning: suggest parentheses around assignment used as truth value"
The beginning of the code is as follows:
while((++argv)[0] && argv[0][0]=='-'){
while(c =* ++argv[0])
The while(c =* ++argv[0]) part being wh...
Hello
i just wander where can i find a tool that takes in my case java script string that is
unescape and converting it to escaped string so i could use it as string value in c++
for example characters like " i need to convert it to \"
i need something smart and not just replace all function .
...
why we use copy constructor? what are the benefits and disadvantages of copy constructor?
...
For simplicity,
class Parent {}
class Child1 : Parent {}
class Child2 : Parent {}
Elsewhere, I created instances of Child1 and Child2 and store it in same vector under Parent:
// . . . in .h file, for example
vector<Parent> vector_of_parent;
// . . . in one particular method
Child1 c1;
Child2 c2;
vector_of_parent.push_back(c1);
ve...
Hello,
I have a problem with many valgrind warnings about possible memory leaks in std::string, like this one:
120 bytes in 4 blocks are possibly lost in loss record 4,192 of 4,687
at 0x4A06819: operator new(unsigned long) (vg_replace_malloc.c:230)
by 0x383B89B8B0: std::string::_Rep::_S_create(unsigned long, unsigned long, std::...
I have a solution with 21 C++ projects and 1 VB.NET project.
The IDE responds very slowly when I simply move the carret in a file or try to open the menu. The process seems to take 50% of CPU for each movement.
It only happens with this solution and only on my machine.
The solution has total of 2380 source and header files, of which 128...
Hi,
I've been strugling for two weeks to create an environment for building a gstreamer plugin on windows (needed for a songbird addon).
I've installed MSYS, MinGW and Cygwin, then installed GStreamer OSSBuild, and I also downloaded the sources for Songbird, which come with their own precompiled version of gstreamer.
I was unable to r...
Context
I am migrating an installer for an ActiveX control from Per-Machine to Per-User. I did this by programming the installer write to HKCU\Software\Classes instead of HKLM\Software\Classes.
Problem
On my machine (Windows 7 with UAC Enabled), the ActiveX control successfully loads. On the other windows 7 test machines (one with ...
Anyone know of a more permissive license (MIT / public domain) version of this:
http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1ustring.html
('drop-in' replacement for std::string thats UTF-8 aware)
Lightweight, does everything I need and even more (doubt I'll use the UTF-XX conversions even)
I really don't want to be car...
Hi,
i need to do a typedef like this.
template< class A, class B, class C >
class X
{
};
template< class B, class C >
typedef X< std::vector<B>, B, C > Y;
I just found that it is not supported in C++. Can someone advise me on how to achieve the same through alternative means?
Thanks,
Gokul.
...
I would like to write a simple program in c++.
After the program is done i would like to get my answers in form of a graph or picture that would give some certain information if i click on a certain area.
i have only written console apllications in c++ before and don't really have a clue where to start with the graphic part of it all.
C...
I am developing 2D game for iphone in Objectice-C.In this project I need to use stack, I can do it using STL(Standard template library) stacks or NSMutableArray, since this stack is widely used in the game which one is more efficient in terms of runtime speed and memory use?
@interface CarElement : NSObject
{
std::stack<myElement*> *m...
I'm trying to invoke C++ from Java using GCJ using the CNI, so far I'm able to invoke Java code from C++. How can I invoke C++ from Java using the CNI?
...
Hey i want to create a mutex with the kernel function NtCreateMutant.
I did it like this:
Handle hMutex;
NTSTATUS ntMutex = NtOpenMutant(&hMutex,MUTEX_ALL_ACCESS,false);
the NTSTATUS value that is returned: C0000024 STATUS_OBJECT_TYPE_MISMATCH
hope someone can help me with calling NtOpenMutant the right way.
With the windows API O...
Hi,
This code fails to compile using g++ 4.2.1 but works fine under vc++ v8.
#include <set>
typedef std::set<int *> IntPtrSet;
IntPtrSet iptrSet;
typedef std::set<shared_ptr<int>> IntPtrSet2;
IntPtrSet2 iptrSet2;
void AddIntegers(int& x)
{
iptrSet.insert(&x);
iptrSet2.insert(&x);
}
shared_ptr is similar to boost::shared_ptr...
Hey,
I was wondering, what was a good cross-platform utility for doing audio recording/ playback/ seeking in C++? I was thinking going the route of ALUT (OpenAL), but is there a better way? If not, do you guys know of any good tutorials/sample code for ALUT?
...