|
They already gave you some good links. Anyway if your problem is to understand if the exe structure itself is compatible between last 5 Os's the answer is yes. The executable format (PECOFF) is the same as the resources format.
More different is the situation from system calls point of view. If an exe using very 'basic' functions can happily run from NT4.0 to WIN10, the things changes as you use new functions from OS or libraries (ie MFC) that were not present in former releases.
So if you want to know if your exec from VC2008 under XP will run on Win7 and Win8 it will do it on 99% of cases.
Instead if you want to build an exe that can run on all OS's from NT on carefully choose the functions you use in your code (or prefer API programming).
P.S. The graphical aspect can be changed between the OS's using an external manifest file with the compatibility fields correctly compiled allowing each OS to use last version of GUI DLL's.
|
|
|
|
|
It should work... however, the libraries used have to be present on that system (unless you explicitly used static linking, which is not the default). MS does package the "redistributables" nicely into an installer for you though. Just make sure that gets installed first or include it along with an installer for your own program and you'll be set.
MS VS2008 x86 Redistributable [^] (there is also a 64bit version, if you don't know which one you're using, it's likely x86 since that's the default build type in 2008 if I remember correctly)
|
|
|
|
|
Hi,
I am creating a child process from a console project way back when I think VS2008
I used to code a _asm { int 3 } to debug the child process the assembler interface is
no longer supported under VS2012 so I have tried DebugBreak(); __debugbreak
In the constructer of the CwinApp or in the InitInstance but nothing happens
When I right click on it to run nothing happens
The CreateProcess in the console process gets a 1 so that works
The only way I can get into the code is if I bring up another instance of VS2012
as this app is another project in the solution and debug from there
any ideas as to why the debugger isn't being invoked would be helpful
thanks
|
|
|
|
|
Hi
This is a follow up to previous message I went back to the parent process
and used the following two flags in the CreateProcess DEBUG_PROCESS and DEBUG_ONLY_THIS_PROCESS
Well back when I was using VS2008 I would get a dialog box informing the VSDebugger
was debugging the process
Now nothing maybe the app crashed before it hit CWinApp constructer where I had the
DebugBreak();
when I went to the "DEBUG" menu item -> Attach to Process I noticed my app on the selection list
When I tried to attach it I got a message Already attached to Debugger
I have no idea what debugger as I only had the original instance to VS2012 running (at least that I could see)
Any help would be appreciated
|
|
|
|
|
Hi
It is apparent there is a issue with debugbreak()
Whether it's windows 8.1 or VS 2012 I don't know
I know I did _asm
{ int 3 }
On my window 7 vs 2010 and it worked
So I am thinking how about this
CreateProces(NULL,
if DEBUG
"C:\windows\system32\vsjitdebugger.exe myprog.exe",
end
else
"myprog.exe",
end
Rest of paramters
|
|
|
|
|
Can you not run the process directly in VS and debug it in the normal way?
|
|
|
|
|
Hi
it just dies somewhere my feeling is there is something amiss in the startup code
as I put DebugBreak(); In The CWinapp constructer
The only way I can debug it if I right click on it VS it gives the option to debug
I know the startup code for a MFC app is somewhere in VS->VC->ATLMFC folder
just trying to figure which one and put a Debugbreak() there
thanks
|
|
|
|
|
hi,
still looking at my problem with debugbreak
for some reason vsjitdebugger which would normally being up a dialog box to chose a debugger
doesn't do that on windows 8.1 vs 2012 pro laptop I think that's part of the problem
Thanks
|
|
|
|
|
Hi
Before I say I can't English writing. So, Understand me please.
I want to change property of CMFCShellTreeCtrl in MFC.
But, I can't see anywhere.
Question 1.
Now, I can change CMFCShellTreeCtrl property to see filename. But I can't filtering of file in CMFCShellTreeCtrl.
Question 2.
How can I set start directory of CMFCShellTreeCtrl to 'C drive' from 'Desktop'.
Help me please
|
|
|
|
|
limseungkyun wrote:
Now, I can change CMFCShellTreeCtrl property to see filename. But I can't filtering of file in CMFCShellTreeCtrl. Just guessing but that almost sounds like you'd need a second pane to show the contents of the selected folder (the tree control in the first pane).
limseungkyun wrote:
How can I set start directory of CMFCShellTreeCtrl to 'C drive' from 'Desktop'. Is it not as simple as calling:
CMFCShellTreeCtrl::SelectPath(_T("C:\\"))
I've not ever used CMFCShellTreeCtrl so my suggestions may be way off.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
How to write a cross platform tcp c program?
|
|
|
|
|
You write it by coding according to the rules that apply for each platform.
|
|
|
|
|
Sockets aren't exactly implemented the same way across multiple platforms. To achieve a cross-platform program that uses sockets, you can either use compile time switches (#defines) to use the appropriate platform-specific calls and system libraries or use a third party library that already has this compile time switching internally.
A few cross-platform socket libraries:
0) http://zeromq.org/[^]
1) www.boost.org (asio library)[^]
2) Larger frameworks have this too (Qt[^], wxWidgets[^])
|
|
|
|
|
Hi
I am somewhat new to TCP/IP, I have been doing some reading on blocking vs non blocking sockets. So my question is when creating a CAsyncsocket object is constructed and created is there a option for what type of socket
Secondly when you get a notification from one of the callback on receive onsend etc
With an error say WSAEINPROGRESS
From the call backs I guess you should just return
|
|
|
|
|
|
Thanks I see there are also some other options with ioctl
|
|
|
|
|
Hi,
I have the following Code:
</#include "stdafx.h"
struct DB_FIELD{
const char* FieldName;
const char* DesignerComments;
const unsigned int FieldFlags;
const int FieldType;
const int FieldEltSize;
const int FieldEltCount;
const int FieldOffset;
const unsigned char PaddingChar;
};
struct DB_FIELD TestFieldItem={
"Key", NULL, 0X00000000, 13, 8, 1, 0, 0 };
This refuses to compile with the following error message:
"error C2552: 'TestFieldItem' : non-aggregates cannot be initialized with initializer list".
I must be doing something stupid, that I cannot see. Initialising Static Structures is the Cut and Trust of CPP!
Can anyone see the Obvious?
Bram van Kampen
|
|
|
|
|
I just tried that and it compiled fine. Maybe there is something more that you are not showing us.
|
|
|
|
|
No, Not much more to show, just an Old Compiler!
It Cannot handle these things, but I found a workaround.
Was frightening at the time!
Thanks,
Bram van Kampen
|
|
|
|
|
As a side note, why declare each member as const?
You could instead write ...
const struct DB_FIELD TestFieldItem =
{
"Key", NULL, 0X00000000, 13, 8, 1, 0, 0 };
|
|
|
|
|
Point taken, and since discovered.
There seems to be a C(PP) language ambiguity here, relating to aggregates. There is never a problem with:
const int Var=512;
Thanks for your reply,
Bram van Kampen
|
|
|
|
|
Hi Guys!,
I have been working on Finite state machine based on a well documented tutorial in code project
Generic Finite State Machine (FSM)[^]
I tried compiling the sample project available with this but can't proceed because of few errors. The project is develped with VS 2010 but I'm using 2012.
I'll give the code excerpt where the error points..
struct StateHandlerBase
{
SharedData data;
States state;
Transitions *m_interfaces[static_cast<size_t>(Size)];
StateHandlerBase()
: data(SharedData()),
state(static_cast<States>(InitState))
{
}
};
typedef int DummyExplicitSpecialization;
template <States stateParam, class Dummy=DummyExplicitSpecialization>
struct StateHandler
: StateHandler<static_cast<States>(static_cast<size_t>(stateParam)-1)>
{
TransitionImplement<StateMachineComponents, static_cast<States>(stateParam)> m_interface;
StateHandler() : m_interface(StateHandlerBase::state, StateHandlerBase::data)
{
StateHandlerBase::m_interfaces[static_cast<size_t>(stateParam)] = &m_interface;
}
};
template <class DummyExplicitSpecialization>
struct StateHandler<static_cast<States>(0), DummyExplicitSpecialization>
: StateHandlerBase
{
TransitionImplement<StateMachineComponents, static_cast<States>(0)> m_interface;
StateHandler() : m_interface(StateHandlerBase::state, StateHandlerBase::data)
{
StateHandlerBase::m_interfaces[0] = &m_interface;
}
};
typedef StateHandler<static_cast<States>(TerminateState), DummyExplicitSpecialization> StateHanlderType;
StateHanlderType StateHanlderInstance;
These are the errors:
error C2976: 'Fsm<statemachinecomponents>::StateHandler' : too few template arguments
error C3855: 'Fsm<statemachinecomponents>::StateHandler': template parameter 'stateParam' is incompatible with the declaration
I'm totally stuck!!. I have no idea what is happening
Greatly appreciate possible suggestions to get out of this
|
|
|
|
|
Member 9350237 wrote: Greatly appreciate possible suggestions to get out of this How about showing the line(s) that the compiler is complaining about.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Well, It's 4th line from last.
struct StateHandlerBase
{
SharedData data;
States state;
Transitions *m_interfaces[static_cast<size_t>(Size)];
StateHandlerBase()
: data(SharedData()),
state(static_cast<States>(InitState))
{
}
<pre>
};
typedef int DummyExplicitSpecialization;
template <States stateParam, class Dummy=DummyExplicitSpecialization>
struct StateHandler
: StateHandler<static_cast<States>(static_cast<size_t>(stateParam)-1)>
{
TransitionImplement<StateMachineComponents, static_cast<States>(stateParam)> m_interface;
StateHandler() : m_interface(StateHandlerBase::state, StateHandlerBase::data)
{
StateHandlerBase::m_interfaces[static_cast<size_t>(stateParam)] = &m_interface;
}
};
template <class DummyExplicitSpecialization>
struct StateHandler<static_cast<States>(0), DummyExplicitSpecialization>
: StateHandlerBase
{
TransitionImplement<StateMachineComponents, static_cast<States>(0)> m_interface;
StateHandler() : m_interface(StateHandlerBase::state, StateHandlerBase::data)
{
StateHandlerBase::m_interfaces[0] = &m_interface;
}
It's here---> };
typedef StateHandler<static_cast<States>(TerminateState), DummyExplicitSpecialization> StateHanlderType;
StateHanlderType StateHanlderInstance;
|
|
|
|
|
Member 9350237 wrote: StateHandlerBase::m_interfaces[static_cast<size_t>(stateParam)] = &m_interface;
Do you mean to have that m_interface; at the end of the line?
Never mind. The HTML got in the way of what I was looking at.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|