-
- LogonUser call fails for NetworkService account on XP x64 inside a 32bit service
by FrankSt2
- 3 Replies
- Last post
by FrankSt2
- Hi all,
This is a software development issue with XP Prof x64. I have a 32bit service which is running under System account under x64 XP. This service calls the API function LogonUser(L"NetworkService", L"NT AUTHORITY", L"", LOGON32_LOGON_SERVICE, LOGON32_PROVIDER_DEFAULT, &hToken); which fails with error ERROR_LOGON_FAILURE 1326L. I want the token of the
-
- Create Archive/Zip programming using C++
by Jai Praful Ved
- 8 Replies
- Last post
by crescens2k
- Hi there !!! I am working on a project where now I need to create a single package of files and folders together in the .ZIP format. I have searched on the internet and found out some sample code and wrapper functions. I would like to know if there are direct system APIs to get this work done. I am programming in C++ and would like to receive help for both Macintosh and Windows !! Please let me kn
-
- Trouble using typedef
by Swarts
- 6 Replies
- Last post
by Swarts
- Hey guys, I'm getting some errors using typedef. I have "typedef unsigned long unsigned32;" located in a header file. In a different header file, about halfway down, I #include the one with the typedef, and then have "unsigned32 Type;". It says that I'm missing storage-class or type specifiers and won't recognize unsigned32. What would be causing this Am I doing it wrong
-
- OpenMP "parallel for" bug
by research_engineer
- 6 Replies
- Last post
by research_engineer
- Parallel for works incorrectly with schedule dynamic and guided if there is continue statement in loop body.
Code example:
omp_set_dynamic(0);
omp_set_num_threads(1);
long count = 0;
#pragma omp parallel for schedule (guided, 1)
for ( int i = 0; i < 99123; ++i)
{
#pragma omp critical (crit1)
{
++count;
}
if (i =
-
- program to run before window shutdown?
by Cool_Bhushan
- 7 Replies
- Last post
by Simple Samples
- Hi to all,
I want to write a program in vc++ which execute before Window shutdown. Is it possible, plz help me.
Is it possible to run a program before window shutdown
If yes then how is it possible.
Ur suggestion is valuable for me.
Thanks in advance.
-
- Pointer to member function problem: cannot bind regular function pointer directly to instance of object
by Max Kukartsev
- 4 Replies
- Last post
by einaros
- Hello,
Let's take for example the following code:
Code Block
class X {
public :
int i;
void MFunc() { }
};
// Declare an instance of X:
X x;
// To declare a pointer to field i within class
// X, I could use the pointer to member syntax:
int X::*imptr = &X::i;
// However, I could also bind the pointer directly
//
-
- Multithreading in C++
by Thread Learner
- 6 Replies
- Last post
by Simple Samples
- Hi,
I am learning multithreaded programming. I have a question with a
hope someone can answer.
I want to find distances between points using thread (Win MFC)
Here are just an example of some points that I want to find the distance between them. For instance,
p1 to p2, p3, p4, p5
p2 to p1, p3, p4, p5
p3 to p1, p2, p4, p5
p4 to p1, p2, p3, p5
p5 to p1, p2, p3, p4
with
p1(x1, y1)
-
- Visual Studio and .Net Runtime Framework dependency
by George2
- 1 Replies
- Last post
by crescens2k
- Hello everyone,
If I am using Visual Studio 2005 to build a C# Class Library (COM), it is as default dependent on .Net Runtime Framework 2.0 when running
If I am using Visual Studio 2003 to build a C# Class Library (COM), it is as default dependent on .Net Runtime Framework 1.1 when running
How to check the .Net Framework Runtime dependencies when using Visual Studio
thanks in advance,
-
- WM_CLOSE is not received by a hidden window when shutting down the device
by AdrianoAlvarez
- 12 Replies
- Last post
by Bite Qiu - MSFT
- Hi all !
I've an application that is running on background, with a hidden window to receive user defined messages.
The problem is that when the device is shutting down, my application did not receive the WM_CLOSE message. I need to perform a clean shutdown to avoid currupted data.
Following is the code I used to create the hidden window:
WNDCLASS wc;
wc.style = 0; //CS_HREDR
-
- How to set WS_CLIPSIBLINGS on an edit control?
by VoiceOfExperience
- 5 Replies
- Last post
by Damien Watkins - MSFT
- How can one specify WS_CLIPSIBLINGS for controls in a dialog in VS2005 The Dialog Editor doesn't seem to have these as options for controls such as edit controls.
-
- Function pointers, pointers and references confusion
by RedKMan
- 7 Replies
- Last post
by RedKMan
- I'm struggling to get my head around this, I'm not entirely sure what is happening here. Wondering if someone could offer a detailed explanation as I can't find an answer elsewhere.
In project InterfaceDLL which is a static lib although Interface.h does not make up part of the static lib.
class DLLManager holds Interface * m_pInterface; in DLLManager.h. Interface is a struct in Interface.h
-
- Error PRJ0019: A toll returned an error code from "Performing Registration"
by AndrewBFT
- 2 Replies
- Last post
by Holger Grund
- I am build a project and getting the following error:
Error PRJ0019: A toll returned an error code from "Performing Registration"
When I manual try to register it. I get the following error
LoadLibary("IPSourceBosch.dll") Failed.
GetLastError returns 0x0000007e
All the code looks fine but can't understand why this is happening.
Can anybody
-
- Is anybody know why Structure padding is done and how it is achieved ?
by Jafar Kumarkiri
- 6 Replies
- Last post
by Pintu Shukla
- Hi, Recently in a C++ interview I have beem asked What is structure padding I serached on the web I got followinf code ,But I am not able to understand,Whordering of variables affect the size of the structure. Code example is as #include<stdio.h> #include<conio.h> struct MyStructA { char a; char b; int c; }; struct MyStructB { char a; int c; char b; }; int
-
- Avoiding DLL hell with unmanaged code
by RustyBubble
- 1 Replies
- Last post
by Bite Qiu - MSFT
- Hi,
is it possible to leverage assemblies to avoid DLL hell with unmanaged code
I have found lots of material on putting unmanaged DLLs in assemblies and lots of stuff on accessing these unmanaged DLLs from managed code.
But I can't find anything on accessing these DLLs from unmanaged code.
Since unmanaged programs access the C runtime etc in assemblies, I presume that
-
- Proting a project form vc1.5 to cv6
by Raju
- 9 Replies
- Last post
by Holger Grund
- Hi all,
i have a project developed using vc1.5, now i want to port that project in to vc 6. i have opened .mak file in vc6, and try to compile, then i got an error
Compiling...
Command line error D2016 : '/ZI' and '/Ob2' command-line options are incompatible
can any one hep me.
thanks,
raju.
-
- hbrBackground = (HBRUSH)(COLOR_WINDOW+1), what is +1 for???
by Pavor
- 6 Replies
- Last post
by Mattias Sjogren
- Hi! The question is about window class registration, when you create a new application with VS, and in most examples you can find on the Internet the following code is used: Code Snippet wc.hbrBackground = (HBRUSH)( COLOR_WINDOW+1 ); This line sets white window background (for Win 2000 and XP, and Vista, I guess). Try to remove +1 and you get white background anyway, so why we have to add +
-
- WM_CLOSE is not received by a hidden window when shutting down the device
by AdrianoAlvarez
- 12 Replies
- Last post
by Bite Qiu - MSFT
- Hi all !
I've an application that is running on background, with a hidden window to receive user defined messages.
The problem is that when the device is shutting down, my application did not receive the WM_CLOSE message. I need to perform a clean shutdown to avoid currupted data.
Following is the code I used to create the hidden window:
WNDCLASS wc;
wc.style = 0; //CS_HREDR
-
- Problem of calling function
by LS Mike
- 5 Replies
- Last post
by Alireza Noori
- I have use frameA to Create DialogA and use DialogA to Create DialogB and DialogC. We have do some trigger by press the button in DialogC. The trigger function should collect some variable from DialogC. Then, do a simple action like pass the variable to DialogB, call the function in DialogB and get the Dialog Item and do some action. How can i do this simple action Regards, Mike
-
- Thread stopped/paused when no debugger attached
by Grenouille12345
- 14 Replies
- Last post
by Grenouille12345
- Hi!
I've got a thread that displays a progress bar window. When I click on another window, the thread is "paused" or stopped and the window doesn't get refreshed anymore. This problem only appears when I'm launching the program from the exe (it works great when launched with Visual Studio 2005).
Here is the code I use to launch the thread:
Code Snippet
-
- How to use CStringList in C++ 2005 and CLI
by oz3fi
- 3 Replies
- Last post
by Bite Qiu - MSFT
-
- First Execution Only...
by SpunkyMan
- 14 Replies
- Last post
by Simple Samples
- Hi, I've been trying to tell my new program to check for a specific condition (whether it is the first execution or not), but I'm having quite a bit of trouble. In fact, it's driving me insane. I spent almost all of last night trying to get this right, but it simply will not work the way I want it to. I've asked a huge number of people for help on message boards across the net, and nobody has been
-
- Add values to property list
by Mystagogue
- 3 Replies
- Last post
by Damien Watkins - MSFT
- I know that you can "bulk" set properties for all build configurations, but that is on condition that the property (whatever it is) is set identically across all configurations.
Instead, I would like to *add* a value to whatever the existing value(s) are. For example, I'd like to add " _CRT_SECURE_NO_DEPRECATE" to the Preprocessor Definitions of all configurations, while sti
-
- MSVCRT vs. MSVCR*?
by Rafael &#40;Live Butte
- 14 Replies
- Last post
by Bite Qiu - MSFT
- Can someone explain or point me in the right direction regarding the difference between MSVCRT and MSVCR* libraries and why applications (i.e. Notepad) are linked to MSVCRT.dll Does MSVCRT.dll just stub out all exports and handle manifests
-
- Help! DLL errors when I exited my program
by Lejing
- 12 Replies
- Last post
by Simple Samples
- I developed a prgram, and when I exited my program, I may got the bellow errors, but not always! Could any one give me some suggestions Thank you! 02347d07() kernel32.dll!7c80a017() [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] ntdll.dll!7c94a5d0() msvcrt.dll!77c2c2e3() msvcrt.dll!77c3a243() ntdll.dll!7c94a5d0() kernel32.dll!7c80b6
-
- Creating Refrence of MdiParent form in child form
by Kunal2209
- 0 Replies
- Last post
by Kunal2209
- I am facing a problem in creating a refrence variable in my child form of mdiParent form . If done , I want to access properties of parent form control and some methods of the form. The problem is the mdiparent form is not recognizable in the child form.