|
There's no rule that states an application needs to make a registry entry when it is installed.
There may be a way, maybe not - this is vendor-specific.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi,
if there is a registry entry you can find it, if there is a Start-Menu entry you can use it too. If not... you have problems But there is still ways to know it, the problem is they are difficult
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Hi,
I want to use a common Database for my Application installed on different Systems in Network. I am using ODBC Connection for Database access through my Application ( application developed in VC++ ).
What should I do for this? ( What is my applicaiton is developed in C# 2005? )
|
|
|
|
|
If the database ODBC driver supports network connections then you should be able to adjust
your connection strings to connect to the database over a network.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I am currently working in a office as network supervisor. In office, we are sharing one internet connection. In the meantime, out internet is very much slow due to some virus/Trojan attacked some of our computers.
For monitoring the our computers, I want to make a program in VB6. I need help for making a DLL (activeX if possible) for following task.
-- can detect network card(s).
-- can detect internet request on Main Computer (from which, internet is shared)
-- can show client IP/MAC address.
-- can drop/pass the request.
-- can redirect to another destination in case of porn site.
|
|
|
|
|
Sunil KC wrote: I want to make a program in VB6
But you are on the VC++ forum.
|
|
|
|
|
I think that detecting internet request from other computers to one computer needs NDIS Hook system and this is possible only from C/C++. But I don't know C/C++.
|
|
|
|
|
|
When I try to start my application developed in VC++ .Net 2003 in Vista System,
an error message saying "The application failed to initialize properly (0xc0000142). Click on OK
to terminate the application." is displayed and I cannot run in both mode(administrator/compatibility).
My application need some DLL files in the same folder if DirectX is not installed.
Any help would be greatly appreciated!!
Best Regards,
Suman
-- modified at 5:57 Thursday 17th May, 2007
|
|
|
|
|
Which dll is needed ? Please check the dependency with dependency walker ?
Regards,
Paresh.
|
|
|
|
|
Hi Paresh,
Thank you very much for great help.
I got the problem. If I remove d3d9.dll from application folder in Vista, application is starting without problem.
Best Regards,
Suman
|
|
|
|
|
I am trying to overload the ">>" and "<<" with two friend functions, and I am receiving 14 errors during the compile time. Anybody could help me out? thanks!!!
Here are the error messages I've received:
============================================================================
--------------------Configuration: IntegerSet - Win32 Debug--------------------<br />
Compiling...<br />
IntegerSet.cpp<br />
c:\documents and settings\administrator\Desktop\project4_c++\integerset.h(19) : error C2143: syntax error : missing ';' before '&'<br />
c:\documents and settings\administrator\Desktop\project4_c++\integerset.h(19) : error C2433: 'istream' : 'friend' not permitted on data declarations<br />
c:\documents and settings\administrator\Desktop\project4_c++\integerset.h(19) : error C2501: 'istream' : missing storage-class or type specifiers<br />
c:\documents and settings\administrator\Desktop\project4_c++\integerset.h(19) : error C2244: 'istream' : unable to resolve function overload<br />
c:\documents and settings\administrator\Desktop\project4_c++\integerset.h(19) : error C2061: syntax error : identifier 'istream'<br />
c:\documents and settings\administrator\Desktop\project4_c++\integerset.h(19) : error C2501: '>>' : missing storage-class or type specifiers<br />
c:\documents and settings\administrator\Desktop\project4_c++\integerset.h(19) : error C2805: binary 'operator >>' has too few parameters<br />
c:\documents and settings\administrator\Desktop\project4_c++\integerset.h(20) : error C2143: syntax error : missing ';' before '&'<br />
c:\documents and settings\administrator\Desktop\project4_c++\integerset.h(20) : error C2433: 'ostream' : 'friend' not permitted on data declarations<br />
c:\documents and settings\administrator\Desktop\project4_c++\integerset.h(20) : error C2501: 'ostream' : missing storage-class or type specifiers<br />
c:\documents and settings\administrator\Desktop\project4_c++\integerset.h(20) : error C2244: 'ostream' : unable to resolve function overload<br />
c:\documents and settings\administrator\Desktop\project4_c++\integerset.h(20) : error C2061: syntax error : identifier 'ostream'<br />
c:\documents and settings\administrator\Desktop\project4_c++\integerset.h(20) : error C2501: '<<' : missing storage-class or type specifiers<br />
c:\documents and settings\administrator\Desktop\project4_c++\integerset.h(20) : error C2805: binary 'operator <<' has too few parameters<br />
Error executing cl.exe.<br />
<br />
IntegerSet.exe - 14 error(s), 0 warning(s)
============================================================================
My header file:
#ifndef INTEGERSET_H<br />
#define INTEGERSET_H<br />
<br />
class IntegerSet<br />
{<br />
public:<br />
int size;<br />
int *arr;<br />
<br />
public:<br />
IntegerSet();<br />
IntegerSet(int m);<br />
IntegerSet(int a[], int n);<br />
IntegerSet operator+(IntegerSet s);<br />
IntegerSet operator*(IntegerSet s);<br />
IntegerSet operator-(IntegerSet s);<br />
void insertElement(int k);<br />
void removeElement(int m);<br />
friend istream &operator>>(istream &is, const IntegerSet &s);<br />
friend ostream &operator<<(ostream &os, const IntegerSet &s);<br />
bool operator==(IntegerSet s);<br />
bool operator!=(IntegerSet s);<br />
bool operator>=(IntegerSet s);<br />
bool operator<=(IntegerSet s);<br />
bool isValid(int k);<br />
~IntegerSet()<br />
{<br />
delete [] arr;<br />
}<br />
};<br />
<br />
#endif
============================================================================
My two functions from the Implementation file.
istream &operator >>(istream &is, const IntegerSet &s)<br />
{<br />
int value;<br />
is >> value;<br />
return is;<br />
}<br />
<br />
ostream &operator <<(ostream &os, const IntegerSet &s)<br />
{<br />
os << "{ ";<br />
for (int i = 0; i < 256; i++)<br />
os << s.arr[i] << " ";<br />
os << "}";<br />
return os;<br />
}
|
|
|
|
|
istream & IntegerSet::operator >>(istream &is, const IntegerSet &s)
{
...
}
ostream & IntegerSet::operator <<(ostream &os, const IntegerSet &s)
{
...
} Please use "pre", not "code" for code listings.
|
|
|
|
|
Thank you very much, but friend shouldn't be a member function, isn't it?
|
|
|
|
|
i have a question to ask!
I,m having some trouble with Ftp error code, After i catch error from 'SetCurrentDirectory()' (error code 12031- connection to the server was reset)
I try to display it (using my 'DisplayErrorString' function with below code in):
'FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM,NULL,dwError,<br />
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), <br />
achBuffer, 120, NULL) ;'
but I get nothing, empty string!
Enyone know what to do?
Thanx!
|
|
|
|
|
josip cagalj wrote: 'FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM,NULL,dwError,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
achBuffer, 120, NULL) ;'
I hope you have got the dwError from the API GetLastError .
You should call the GetLastError function immediately when a function's return value indicates that such a call will return useful data.
Regards,
Paresh.
|
|
|
|
|
Jes I do. I Call GetLastError immediately
if (!theApp.m_pConn->SetCurrentDirectory(voxftpdir))<br />
{<br />
CString str;<br />
err=GetLastError();<br />
...<br />
|
|
|
|
|
josip cagalj wrote: CString str;
err=GetLastError();
Please change the order. Hope this will serve your purpose.
Regards,
Paresh.
|
|
|
|
|
I think we misunderstand, so I'll recreate my question.
I switched off lan-cable on purposely to see how will my app react!
When I tried to get something from web server I used SetCurentDirectory() which trow error code 12031, but when i tried to get text explaining using:
'FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM,NULL,dwError,MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),achBuffer, 120, NULL) ;'
which puts it in 'achBuffer' i've got nothing!!!!
Afterward i've searched the web and find out that 1203 error code stands for 'connection to the server was reset'.
My problem is how can I get it from a above solution (FormatMessage) and post it with AfxMessageBox???
Thanks!
|
|
|
|
|
There's probably no message available in the system. If FormatMessage fails (returns 0) then
call GetLastError()...you'll probably get error code 317 ("The system cannot find message text
for message number ...").
You'll need to supply your own error strings.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Whats the return value of FormatMessage?
|
|
|
|
|
I've solved the problem, I just needed to load "WININET.DLL"
HMODULE m_hWininet = LoadLibrary(_T("WININET.DLL"));<br />
and than
FormatMessage (<br />
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE,<br />
m_hWininet,dwError,<br />
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), achBuffer, 120,<br />
NULL) ;<br />
And that it's!
Thanks to all!
P.S.
Don't forget to free library after!
|
|
|
|
|
Hi i am working on a project where it is reading files (names are stored on a CArray[CS ,CS] FArray ). CS = CString and [ = < ] = >
While it Reading a file :
In each Buffer line it search if there is any word (stored in a CArray[CS,CS] WArray) int ntimes is the number that each WArray element found in Buffer Line
and the end each ntimes is stored in RArray.
Code is working perfect till ifstream TextFile
when i am adding the next code lines the .exe i build is freezing and
become (Not Responding)
if someone could see the reading code for some faults i would greatful
CArray<cstring ,="" cstring=""> RArray;
CString FilePathName;
CString LineRead ;
int ntimes=0;
const int sz =100;
char buf[sz];
m_FolderName = "C:\\test123\\";
for ( int p = 0 ; p < FArray.GetSize() ; p++)
{
FilePathName = m_FolderName + FArray.GetAt(p);
m_List.AddString(FilePathName);
ifstream FileText(FilePathName);
while(FileText.get(buf,sz))
{
FileText.get();
LineRead = (LPCSTR) buf;
for ( int m = 0 ; m < WArray.GetSize() ; m++)
{
int nStart=1;
while ( LineRead.Find(WArray.GetAt(m),nStart)!=0)
{
ntimes = ntimes +1;
nStart= LineRead.Find(WArray.GetAt(m) , nStart);
}
RArray.Add(""+ntimes);
}
}
FileText.close();
return;
}
|
|
|
|
|
|