|
I suspect you're trying to do something in your service initialisation that's now disallowed under Windows Server 2008.
I would suggest you debug the service initialisation when running under Windows Server 2008 and see what fails? This page[^] may help you.
|
|
|
|
|
Hi
We need to port an application developed in VC++ 6.0 in which the activex controls MSFlexGrid and MSChart are used ,to 64 bit windows XP/VS2008. But it is not working because of 32 bit version of activex controls.
Are the 64-bit equivalents of MSFlexGrid.ocx and mschart.ocx available?
If not does any 3rd party dlls exist for the same?
Or does microsoft provide any other technology to use flexgrid in 64 bit application?
|
|
|
|
|
whenever i minimize my applicationin VisualC++ 6.0, after that i m unable to display any messages or connect to database.........
it looks like application is losing its control after minimize.....
some people said to use invalidate() function but dnt knw how to use it.......
Can anyone tell me solution of this problem????
Please reply fast........
modified on Thursday, February 5, 2009 11:55 PM
|
|
|
|
|
|
You'll probably get more answers in the managed C++ forum.
|
|
|
|
|
Thanks for the sugestion. Being a VB guy with only minimal C++ exposure I get rather lost amongst the C++ dialects. Probably the root of my problem in a foreign country.
Regards
Ron
|
|
|
|
|
Hi,
Is there a function that will tell me on wich drive the OS (Windows) is installed? I need this to perform a license check because not everyone has its OS installed on the C drive. And related to that: for the license check I use the volume information of the drive. In understand that it is different from the hardware ID of the drive, but how often do people reformat the drive where the OS is installed? I guess it is about as often as a drive would crash (well, maybe a little bit more), so that tells me the volume information check should be good enough for a license check. Am I doing something wrong in my reasoning, or did I forget something? I also understand that the volume id of a drive can be programmatically changed, but has this feature ever been used to override a license check?
Any input is appreciated, thanks!
|
|
|
|
|
Environment variable SystemRoot=C:\WINDOWS
If it's good enough for you, don't let anyone else tell you different.
|
|
|
|
|
FloatingMarc wrote: Is there a function that will tell me on wich drive the OS (Windows) is installed?
Check out GetWindowsDirectory() or SHGetFolderPath(CSIDL_WINDOWS) .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Thanks for the information to both of you!
|
|
|
|
|
I have the following codes:
void Fun(int *v1, int *v2);
int *n1 = 0;
int main(int argc, char* argv[])
{
int *n2 = new int;
*n2 = 3;
Fun(n1, n2);
delete n2;
return 0;
}
void Fun(int *v1, int *v2)
{
v1 = v2;
}
After compiled and run, the value of n1 is supposed to the pointer value of v2 which contains an integer 3 after called Fun and before the delete statement. But actually not, n1 is still 0 after called Fun. why?
Thanks.
|
|
|
|
|
Thats is because if you pass an argument as pointer then only changes in the value of the argument will be preserved. If you want to change the pointer itself then you have to use double poitner.
int *n1 = 0;
void Fun(int **v1, int *v2)
{
*v1 = v2;
}
int main(int argc, char *argv[])
{
int *n2 = new int;
*n2 = 3;
Fun(&n1, n2);
delete n2;
return 0;
}
-Saurabh
|
|
|
|
|
Hi,
I am fighting with tab control. I can not show a dialog from resource on a tab control. I don't use MFC. I have two dialogs main with tab control and second:
///definition of my second dialog from resource file
IDD_LOADPROFILE DIALOGEX 0, 0, 87, 46
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
on this message I am trying to show second dialog
case WM_INITDIALOG:
TCITEM tc;
tc.mask = TCIF_TEXT | TCIF_PARAM;
tc.pszText = "Current setting";
tc.lParam = IDD_LOADPROFILE;/// this is ID from my resource
SendDlgItemMessage(hDlg,IDC_TAB1,TCM_INSERTITEM,0,(LPARAM)&tc);
I see only the tab with label "Current settings", but I dont see second dialog.
Thank you very much.
|
|
|
|
|
I load a dialog from resource onto a WTL tab control. My dialog is:
IDD_STACKERSTATUS DIALOGEX 0, 0, 589, 442
STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE
EXSTYLE WS_EX_CLIENTEDGE
Loading of the dialog onto a tab I use:
m_tabView.Create(m_tPane.m_hWnd, rcDefault, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, WS_EX_CLIENTEDGE);
m_StackerStatusDlg.Create(m_tabView.m_hWnd,rcDefault, NULL);
m_tabView.AddPage(m_StackerStatusDlg.m_hWnd, _T("Stacker Drive"));
Hope this is of some help.
|
|
|
|
|
Ok im trying to code a program that includes an mp3 into the exe and plays the mp3 from it, well the only problem im having and and have not been able to solve and i have been looking for 2 days now is why im having errors in my resource files im using dev C++ latest version
here is the resource file (.rc)
#include <windows.h>
#include "resource.h"
MP3_JIZZSONG RCDATA ".\\resource\\mp3\\jizz.mp3"
ICON_EXE ICON DISCARDABLE ".\\resource\\icon\\cmd.ico"
</windows.h>
here is the matching header
#define MP3_JIZZSONG 100
#define ICON_EXE 200
i have been getting this error on compile
5 N:\Documents\JizzCannon2.0\resource\resource.rc [Resource error] syntax error
if any one knows about .rs and .res files and could help that would be great thanks
-Largo Usagi
|
|
|
|
|
Looking at the documentation[^], an RCDATA needs 'raw data', enclosed by braces (which you don't have) - it can't include the contents of an external file.
I would suggest you use a user defined resource[^], as that can include the contents of a file - that's the approach I've used in the past.
|
|
|
|
|
I try to use this codes at vista but I can't run it. I use dev c++ .. this is my codes:
int main(void)
{
HKEY hKey;
char szFile[] = "D:\\xxx.exe";
RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", &hKey);
RegSetValueEx(hKey, "regeditkey", 0, REG_SZ, szFile, strlen(szFile));
RegCloseKey(hKey);
return 0;
}
I try to add my program in registry to autorun...
can you help me..
I use C programming.
|
|
|
|
|
mgbrain wrote: I try to use this codes at vista but I can't run it
OK....now, tell us, why can't you run it - what's stopping you - what's failing - help us to help you....
[edit]I presume you realise you'll need to run this program with sufficient privileges to be able to write to HKLM? Have you run it in an administrator account?[/edit]
|
|
|
|
|
I think it must run but it isn't.. when I try to use it in my program, my program runs but autorun codes is not run. I can compile my program in dev c++.. but I wanna add my program to autorun as a new key in registry.
|
|
|
|
|
Add some error checking. Check the status return values from RegOpenKey and RegSetValueEx - that should help you work out what's failing.
|
|
|
|
|
I add some error checking.. it seems having no problem..
#include<windows.h>
int main(void)
{
HKEY hKey;
char szFile[] = "D:\\prog.exe";
RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", &hKey);
RegSetValueEx(hKey, "regkey", 0, REG_SZ, szFile, strlen(szFile));
RegCloseKey(hKey);
return 0;
}
with these codes, I try to add my program in registry, I used these codes in my program's codes, but it does not work..
can you try to use these codes please..
|
|
|
|
|
mgbrain wrote: I add some error checking
Really? Can't see it - try this:
#include <Windows.h>
#include <stdio.h>
int main(void)
{
HKEY hKey;
char szFile[] = "D:\\prog.exe";
LONG status = RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", &hKey);
if (ERROR_SUCCESS==status)
{
status = RegSetValueEx(hKey, "regkey", 0, REG_SZ, szFile, strlen(szFile));
if (ERROR_SUCCESS!=status)
else
{
fprintf(stderr, "RegSetValueEx failed - %d\n", (int)status);
}
RegCloseKey(hKey);
}
else
{
fprintf(stderr, "RegOpenKey failed - %d\n", (int)status);
}
return 0;
}
mgbrain wrote: can you try to use these codes please
Sorry, no - I don't have or use Windows except at work (and I'm at home currently).
|
|
|
|
|
It didn't work.. there is no error message..
|
|
|
|
|
|
I'm sorry but how can I use process monitor
|
|
|
|