|
I know the IP of my machine. The machine is in UK, and now I am in PAKISTAN. IS there any way that I can access my files in Pakistan.
|
|
|
|
|
uhm, there is an article here on CP about remoting (Look in the "Networking and Internet" section). But do you want to make an application or do you just want to get access to your files?
Then you can use VNC (www.realvnc.com) or Remote Desktop that comes with XP.
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
I want to make an application. What technology would be involved in make tool like PCAnyWhere
|
|
|
|
|
|
i wish to change the font to bold as well as make colour changes to background and font for my listbox, how do i do that?
|
|
|
|
|
You could change the font type by changing the font type of your form resource. Like dialog, formview and etc.
It will change your button and list box font type when it is in the on top of dialog.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Use owner-draw style and process the corresponding messages.
|
|
|
|
|
Hi
My situation... suppose I have got two idl's. One is A.idl and otherone is B.idl. I am using A.tlb (product of A.idl) in B.idl by using following code...
importlib("A.tlb");
but compiler says it cannot find the A.tlb. But if I do this...
importlib("C:\\Projects\\A\\A.tlb");
it works... wats the matter??
Both A and B are different projects and me using VC++ 6.0
Any solution? I'm stuck...
---------------------
A gasp of breath,
A sudden death:
The tale begun.
A rustled page
Passes an age:
The tale is done.
|
|
|
|
|
fadee wrote:
Both A and B are different projects and me using VC++ 6.0
If you have a hierarchy like
Projects
A B
then you can say
importlib("../A/A.tlb")
or alternatively change the search path that MIDL is using. In VC6 this is the MIDL page of the project settings "Additional Include Directories".
In general, you should try and avoid hardcoding absolute paths in things, as you might one day build on a different box.
Steve S
|
|
|
|
|
Thanks for the help.
But I compiled the thingy with same settings in VC++ .NET and it worked!
I think my VC++ 6 is old enough, needs service packs
---------------------
A gasp of breath,
A sudden death:
The tale begun.
A rustled page
Passes an age:
The tale is done.
|
|
|
|
|
Anybody out there still using old iostreams in an MFC project under MSVC.NET?
I tried to compile a project that worked fine in MSVC6 and received a series of LNK2005 errors, one of which is reproduced below:
libcimtd.lib(fstream.obj) : error LNK2005: void _cdecl operator delete(void*, int, char const *, int) already defined in nafxcwd.lib
I believe I'm across all the reasons in MSDN why these sort of errors occur and that my project is set up OK. So what's wrong now?
I guess that the odd signature of the delete operator means its a debugging overload ( for the instrumented heap ). Is that significant?
tony
|
|
|
|
|
I search net,can't find a answer,plz help me.
|
|
|
|
|
How about NetUserEnum?
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
|
|
|
|
|
Thanks!your answer is very valuable.
|
|
|
|
|
If you have several cameras installed, only one device is available for VFW32 (cap* API) always - WDM Capture Driver for VFW. When you try to open several cameras at once, you have to manually choose which camera by a dialogue-box provided by this WDM device driver. Is there anyway to programmatically choose which camera?
comrade
http://comrade64.cjb.net/
|
|
|
|
|
I remember having heaps of problems with the VFW camera API, so much so that we eventually gave up and used DirectShow. DirectShow incidentally makes makes choosing cameras quite easy, some of the samples are quite easy to extend from an arbitrary number of cameras.
DirectShow abstracts the use of VFW or WDM's under the covers, so it doesn't matter which drivers you have, and the additional functionality can be very helpful.
BTW: Just a quick warning, if you intend to stream from multiple cameras at once, it's likely that you will have problems. I'm not sure where the problems start - possibly in the shear bandwidth required to use multiple cameras, but you may end up with frames, or parts of frames, from different cameras 'jumping' streams. Similarly last time I was pushing DirectShow with multiple cameras we had problems with showing multiple video windows at the same time.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Thanks for your reply. I am aware of DirectShow API, and it is probably a better choice - but we are using Visual Basic for this application and right now just VFW seems to be implementable.
comrade
http://comrade64.cjb.net/
|
|
|
|
|
For a school project, I am re-writing the data access code from a Visual Basic application into C++. I used the C++ class wizard to set up the recordset classes and have tested those classes to ensure they connect to the MySQL database and retrieve the information. That all works! Now, its time to hook the VB executable (the front end) to the C++ data access code. (This is really the whole point of the project, to learn how to work between the two languages). I am using an API call from the VB code to connect to C++. In C++, when I debug, the code runs to the last bracket (marked with ******) and then I get an Open File dialog asking me to "Please enter the path for CRTDLL.C". I have searched for this file on my machine. Its not there. I have searched MSDN and haven't come up with much that is helpful (some of it, I just don't understand).
Any help, no matter how rudimentary, will be appreciated.
CODE FOLLOWS:
DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)<br />
{<br />
UNREFERENCED_PARAMETER(lpReserved);<br />
<br />
if (dwReason == DLL_PROCESS_ATTACH)<br />
{<br />
TRACE0("DATAACCESS.DLL Initializing!\n");<br />
<br />
if (!AfxInitExtensionModule(DataAccessDLL, hInstance))<br />
return 0;<br />
<br />
new CDynLinkLibrary(DataAccessDLL);<br />
}<br />
else if (dwReason == DLL_PROCESS_DETACH)<br />
{<br />
TRACE0("DATAACCESS.DLL Terminating!\n");<br />
AfxTermExtensionModule(DataAccessDLL);<br />
}<br />
CoUninitialize();<br />
return 1;
} ******
|
|
|
|
|
The debugger is trying to find source code for the _DllMainCRTStartup function, which is the actual DLL entry point function (it calls your DllMain after initialising the C Run-Time library). You can just press Cancel to get the debugger to continue.
It's probably doing this because you tried to Step Out of DllMain . Just choose Run when you get to the end of the function. If you do step out, but you haven't got the source, you'll land in a Disassembly window.
If you do want to see _DllMainCRTStartup , make sure you've installed the C Run-Time source code from the CD (by default, it's not installed) and browse to C:\Program Files\Microsoft Visual Studio\VC98\CRT\SRC (Visual C++ 6.0), C:\Program Files\Microsoft Visual Studio .NET\Vc7\crt\src (Visual Studio .NET 2002) or C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\crt\src (Visual Studio .NET 2003).
|
|
|
|
|
I have a program that requires a text file for it to function properly. I figured that it would be easiest for the user to not have to deal with the text file and just have it stored within the program. So is there a way to include a text file within a program and be able to read as if it was a text file? The file never needs to be changed so it seems like it's do-able. So can this be done?
I was accidentally looking at my own code and was thinking, "what is this guy doing?"
|
|
|
|
|
|
Import the text file into your project and give it a custom resource type, and name this resource whatever you want to. Then in your application you can use ::FindResource and ::LoadResource to copy the resource to a memory block and have full control over the memory. Bellow is a sample of how to do it.
DWORD CopyResToMem(UINT nResourceID, LPCTSTR lpResourceType, LPVOID lpBuffer, DWORD dwMaxBufferSize)
{
::ZeroMemory(lpBuffer, dwMaxBufferSize);
HRSRC hRs = ::FindResource(NULL, MAKEINTRESOURCE(nResourceID), lpResourceType);
if (hRs == NULL)
{
return 0;
}
HGLOBAL hGlb = ::Loadresource(NULL, hRs);
if (hGlb == NULL)
{
return 0;
}
LPVOID pData = ::LockResource(hGlb);
if (pData == NULL)
{
return 0;
}
const DWORD dwActualSize = min(dwMaxBufferSize, ::SizeofResource(NULL, hRs));
::memcpy(lpBuffer, pData, dwActualSize);
return dwActualSize;
}
Import your text file into your project, give it a custome resource type "TXT", and name this resource "MYTEXT". To retrieve the text file:
DWORD dwMyTextSize = 1000;
BYTE* pData = new BYTE[dwMyTextSize];
DWORD dwActual = CopyResToMem(MYTEXT, _T("TXT"), pData, dwMyTextSize);
ASSERT(dwActual > 0);
delete [] pData;
pData = NULL;
|
|
|
|
|
Thanks.
|
|
|
|
|
The one thing I did not like about this sample, is if your buffer is too small, you don't know how large to make it.
Perhaps you could SetLastError(ERROR_INSUFFICIENT_BUFFER) if the buffer size passed in was too small, so the client could determine that all the data was not obtained.
The memories of a man in his old age are the deeds of a man in his prime.
|
|
|
|
|
Well I was just giving the original hoster a rough idea on how to use a custome resource in his application, and of course the sample code were not perfect and he should change it a bit to fit his particular needs if he wants to employe the code pieces.
And yes, the issue you pointed out was existing, I did not address it in my post because I thought it'd better to leave things short and clear... hehe, anyway, we can do this:
DWORD GetResourceSize(UINT nResourceID, LPCTSTR lpResourceType)
{
HRSRC hRs = ::FindResource(NULL, MAKEINTRESOURCE(nResourceID), lpResourceType);
return ::SizeofResource(NULL, hRs);
}
Then in our application we should be able to allocate exact amount of memory needed.
DWORD dwMyTextSize = GetResourceSize(MYTEXT, _T("TXT"));
BYTE* pData = new BYTE[dwMyTextSize];
delete [] pData;
pData = NULL;
This should be better.
|
|
|
|