|
I want to allow networked PCs access to my server application. It has various parts and I want to tell the clients PCs where the address of the parts sit (a network address of the server folders). I can do it using a small install program run on each PC individually that inserts the server address of the files in the client PC registry but, is there a elegant way of letting the client PC use a remote program and access the server registry or the files local to the server.
Basically, from the client PC, if I run a program on the server can I retrieve data from the server registry rather than the local client registry.
Any thoughts?
Cheers
u6ik
|
|
|
|
|
You can connect to a regirstry in a remote machine, provided you have got the proper acccess rights.
Check out RegConnectRegistry()
|
|
|
|
|
Perfect! Many thanks
u6ik
|
|
|
|
|
I’m trying too passing a window handle from my application to an Interface
Software. The software will then send messages to my application. But it seems like no messages are sent at all. Its really strange though when I create another dialog (config window for my first window) in the first dialogs OnInitDialog(); function where I’m calling the Interface function it works. And then when I remove the code for the config dialog no message is sent.
Kind of hard to explain in words, here is the code that works:
:BOOL ClightswitchDlg::OnInitDialog()<br />
{<br />
int retval;<br />
CDialog::OnInitDialog();<br />
<br />
<br />
hZigBee = new CZigBeeIf();
<br />
retval = hZigBee->ZBIFConnect( m_hWnd );
<br />
<br />
CConfigureDlg hConfigureDlg;
<br />
INT_PTR nResponse = hConfigureDlg.DoModal();
if (nResponse == IDCANCEL)<br />
{<br />
return FALSE;
}<br />
<br />
hZigBee->ZBIFSubscribe( ZDO_SET_CONFIRM );<br />
hZigBee->ZBIFSubscribe( ZDO_RESET_CONFIRM );<br />
hZigBee->ZBIFSubscribe( ZDO_START_CONFIRM );<br />
hZigBee->ZBIFSubscribe( ZDO_END_DEVICE_BIND_CONFIRM );<br />
hZigBee->ZBIFSubscribe( AF_INDIRECT_CONFIRM );<br />
hZigBee->ZBIFSubscribe( ZDO_NLME_SYNC_CONFIRM );<br />
<br />
Sleep( 1000 );
<br />
hZigBee->ZDO_RESET_request( 0 );
<br />
<br />
return TRUE; <br />
And the same code without config dialog that doesn’t work:
BOOL ClightswitchDlg::OnInitDialog()<br />
{<br />
int retval;<br />
CDialog::OnInitDialog();<br />
<br />
<br />
<br />
<br />
hZigBee = new CZigBeeIf();
<br />
}<br />
<br />
retval = hZigBee->ZBIFConnect( m_hWnd );
<br />
<br />
hZigBee->ZBIFSubscribe( ZDO_SET_CONFIRM );<br />
hZigBee->ZBIFSubscribe( ZDO_RESET_CONFIRM );<br />
hZigBee->ZBIFSubscribe( ZDO_START_CONFIRM );<br />
hZigBee->ZBIFSubscribe( ZDO_END_DEVICE_BIND_CONFIRM );<br />
hZigBee->ZBIFSubscribe( AF_INDIRECT_CONFIRM );<br />
hZigBee->ZBIFSubscribe( ZDO_NLME_SYNC_CONFIRM );<br />
<br />
Sleep( 1000 );
<br />
hZigBee->ZDO_RESET_request( 0 );
<br />
return TRUE; <br />
}
|
|
|
|
|
Strange error, try stepping the code with the debugger to check if everything runs as expected, especially that the m_hWnd is not NULL.
The implementation of CZigBeeIf and the actual hardware associated with it are also suspicious. In the first case there is a greater time lag between the creation of the object and the subscribe events (a dialog pop ups and user must click at least one button). Try emulating this delay with a sleep call to see if that is what is causing the problem.
|
|
|
|
|
Thanks
A sleep call before Subscribe to the callbacks sorted it out.
|
|
|
|
|
Somebody knows or knows somebody that it knows to instantiate the ActiveX Print Template of InterNet Explorer?
More information about Print Template:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/IETechCol/dnwebgen/beyondprintpreview.asp
Please help! This is important.
Max from Brazil
|
|
|
|
|
hi,
i created a lib with c compiler -> Compile as C Code (/TC)
than the aquapark link this lib!
and when i start aquapark (i set a breakpoint in main.c) than i get the folliwings error:
C runtime library....
no idea whats wrong here...what should i change?
bye
<br />
'aquapark.exe': Loaded 'C:\Dokumente und Einstellungen\Gerald\Desktop\aquapark-20060404\aquapark\debug\aquapark.exe', Symbols loaded.<br />
'aquapark.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.<br />
'aquapark.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.<br />
'aquapark.exe': Loaded 'C:\Dokumente und Einstellungen\Gerald\Desktop\aquapark-20060404\aquapark\debug\msvcr80d.dll', Symbols loaded.<br />
'aquapark.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.<br />
'aquapark.exe': Loaded 'C:\Dokumente und Einstellungen\Gerald\Desktop\aquapark-20060404\aquapark\debug\SDL.dll', Binary was not built with debug information.<br />
'aquapark.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', No symbols loaded.<br />
'aquapark.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded.<br />
'aquapark.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.<br />
'aquapark.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.<br />
'aquapark.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.<br />
'aquapark.exe': Loaded 'C:\WINDOWS\system32\glew32.dll', Binary was not built with debug information.<br />
'aquapark.exe': Loaded 'C:\WINDOWS\system32\opengl32.dll', No symbols loaded.<br />
'aquapark.exe': Loaded 'C:\WINDOWS\system32\glu32.dll', No symbols loaded.<br />
'aquapark.exe': Loaded 'C:\WINDOWS\system32\ddraw.dll', No symbols loaded.<br />
'aquapark.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll', No symbols loaded.<br />
'aquapark.exe': Loaded 'C:\Dokumente und Einstellungen\Gerald\Desktop\aquapark-20060404\aquapark\debug\msvcr80.dll', Symbols loaded.<br />
First-chance exception at 0x7c91eae0 in aquapark.exe: 0xC0000005: Access violation reading location 0x00000130.<br />
R6034<br />
An application has made an attempt to load the C runtime library without using a manifest.<br />
This is an unsupported way to load Visual C++ DLLs. You need to modify your application to build with a manifest.<br />
For more information, see the "Visual C++ Libraries as Shared Side-by-Side Assemblies" topic in the product documentation.<br />
Windows has triggered a breakpoint in aquapark.exe.<br />
<br />
This may be due to a corruption of the heap, and indicates a bug in aquapark.exe or any of the DLLs it has loaded.<br />
<br />
The output window may have more diagnostic information<br />
-- modified at 19:40 Tuesday 4th April, 2006
|
|
|
|
|
surfman19 wrote: For more information, see the "Visual C++ Libraries as Shared Side-by-Side Assemblies" topic in the product documentation.
I'd start with that article.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
i read it! a dll is missing???????? hm
cu
|
|
|
|
|
Has anyone ever seen mention or code to obtain the text used to register a windows message?
Suppose I already have the message identifier, what I want to be able to do is to know what text was used to obtain the registered message identifier.
It would be similar to GlobalGetAtomName, which very curiously has an upper range one less than the beginning of the first registered windows message
We see our application bombarded with a registered windows message, and we want clues to find out what the 'message' really is.
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
Hello everyone,
I am using LoadLibrary method in embedded Visual C++ 4.0 to load an dll file. I placed the dll file in \Windows directory, and then I use the following method to load it,
<br />
hLib = oLoadLibrary("\\Windows\\foo.dll");<br />
if (NULL == hLib)<br />
{ <br />
rc = -1;<br />
char* lpMsgBuf;<br />
FormatMessage( <br />
FORMAT_MESSAGE_ALLOCATE_BUFFER | <br />
FORMAT_MESSAGE_FROM_SYSTEM | <br />
FORMAT_MESSAGE_IGNORE_INSERTS,<br />
NULL,<br />
GetLastError(),<br />
0,
(LPTSTR) &lpMsgBuf,<br />
0,<br />
NULL <br />
);<br />
MessageBox( NULL, (LPCTSTR)lpMsgBuf, L"Error", MB_OK | MB_ICONINFORMATION );<br />
LocalFree( lpMsgBuf );<br />
}<br />
when executing the above statement, there is an error message said "The specified the module could be found". Does anyone know whether there is anything wrong with my above code segment or I need to do some environment setup?
I am currently using Microsoft embedded Visual C++ 4.0 (plus service pack 4), and I have installed Pocket PC 2003 SDK and using the emulator to debug the program.
thanks in advance,
George
|
|
|
|
|
This is for some medical research I'm involved in
http://www.xs4all.nl/~ingenium/dicom.html[^]
Under the download section for Windows I've downloaded the DICOM server, dgate and dicomlib. What I need to do is to investigate and use the "DiComDataObject" that's defined in one of the source files.
It's defined in DEIVR.hpp and cxx in "dicomlib" zip. I've never even seen a CXX file but it seems to just be C++ source
There are no project files and I'm having problems setting it up to compile just by adding these files into a Hello World Win32 console app. I've tried working out which files and libs I need to include but it's been so long since I used C++/VC++ its not easy so hope someone can quickly get me up to speed. All I want to be able to do is use these source files to be able to load a dicomdataobject (with its char* filename constructor) and then I should be able to work out how to fiddle with the object once it's in there
This would also just be general good info on how to set up projects properly - I had some errors about pre compiled headers which I couldnt find references to, then some data types were missing but I couldn't make them all go away, and I couldnt easily follow the chain of includes
can someone help me, I'd be forever indebted to you!
regards
Lee
|
|
|
|
|
Usually the procedure like this
Include the header file, in one of ur header/source file
Create DiComDataObject or whatever u need
Copy the Lib file to ur project directory
Add the library name in VisualStudio ->Project > Settings -> link tab
object library modules
By default, Visual C++ projects use precompiled headers. This is a system whereby the large Windows headers are compiled only once when you build stdafx.cpp. Every other .CPP file in your project needs to #include "stdafx.h" as the first #include in order to build. The compiler specifically looks for the name "stdafx.h" to know when to insert the precompiled header information.
If you received the source for an entire program from someone else, and you want to build it as a Visual C++ project, you can turn off precompiled headers instead. In your project options, go to the C/C++ tab and select the Precompiled headers category. Click the Not using precompiled headers radio button, then click OK.
|
|
|
|
|
I need to set up remote debugging for a C++ project I am working on as a couple of users are getting a crash on particular machines that can't be replicated on any of our programming team PC's. All the computers are running windows XP(Pro I think - Does it matter?) and we have a high speed network connection to their PC's. From what I have been able to gather, I need to use these files
MDM.exe
msvcmon.exe
msvcr71.dll
natdbgtlnet.dll
natdbgdm.dll
dbghelp.dll
but the rest of the information seems rather vague. Apparently I need to "install" these files, which by install I gather they mean dump in a common directory. Then I need to run MDM.exe on the client and I should be able to launch from VS on my machine while running the process on the client???
Has anybody here done this before who could give me some pointers?
Should I be able to do all the things I can do debugging locally?
When I die I'd like to go peacefully in my sleep like my father, not screaming in terror like his passengers!!!
|
|
|
|
|
You have to run msvcmon.exe on the remote machine before trying to connect to it from the debugger.
Check msvcmon.exe in the MSDN
(To use the tcpip without a password and without timeout, issue the command: msvcmon.exe -tcpip -anyuser -timeout -1)
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Does anyone know how to make an application perform like the Windows Media Player. That is, it has the ability to hide the toolbar, menu, and caption. Then when the mouse goes into the area where the caption should be, the caption, menu, and toolbar all appear. When the mouse goes out of the area, it goes back to the hidden mode.
|
|
|
|
|
|
That won't work. The Media Player doesn't work that like.
|
|
|
|
|
I tried to use SetItemState to select items in a list. but the list is not updating the selection information, even I put a m_list.SetRedraw(TRUE) after that. Is this the right way or I miss something?
for (intRowCount = 0; intRowCount < m_list.GetItemCount(); intRowCount++)
{
m_list.SetItemState(intRowCount, LVIS_SELECTED, LVIS_SELECTED);
}
Thanks
|
|
|
|
|
Ajax95 wrote: ...but the list is not updating the selection information
Does the control have the LVS_SINGLESEL style? If so, only the last item will be selected.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
The following code sample demonstrates the selected items in the list control.
CListCtrl* pListCtrl = (CListCtrl*) GetDlgItem(IDC_YOURLISTCONTROL);
ASSERT(pListCtrl != NULL);
POSITION pos = pList->GetFirstSelectedItemPosition();
if (pos == NULL)
TRACE0("No items were selected!\n");
else
{
while (pos)
{
int nItem = pList->GetNextSelectedItem(pos);
TRACE1("Item %d was selected!\n", nItem);
}
}
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|
|
Thanks for all of your help. I've find my mistake. I forgot the set the list attribute "Always show selection" to "true".
Thanks
|
|
|
|
|
Hi,
I'm trying to create list of presets for a small wave app I'm making, basically I have a few sliders controlling things like the attack and decay of a wave file.
I'm struggling to figure out how I can move the sliders around by selecting an item from a list box.
Hope this makes sense, any help would be great.
Thanks,
A Davies
|
|
|
|