|
Well quite a few months of effort has gone into the project. And to get something like this as a comment is not the best way of starting things.
|
|
|
|
|
Sorry, that was not my purpose to offense you. There must surely be a lot of work and lot of efforts behind this... But personally I think VB is not enough structured to be a good programming language, so you can make things without understanding what you are really doing... And when mixing it with C++, I think you will loose the benefits of C++ programming (that is have access to almost everything you want).
|
|
|
|
|
Um, I suppose for academic purposes this is quite interesting to do. What do you plan to do with the project?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Any one ready to buy the idea
It is just an experiment I was trying out to see if something like this could be done. I love programming in BASIC and wanted functions that I used in BASIC in C++.
|
|
|
|
|
hi !
hi,
generally according to msdn, CreateMsgService has two return favlues, S_OK and MAPI_E_NOT_FOUND. Well i used mapi to create a new imail service.I am adding the service to a new profile that i am creating.In some machines it is working perfectly.In some others however there is an error.Note that MAPI is initializing properly and the profile is getting created.However CreateMsg service ( return type hr ) is returning failure , but the failure code is NOT MAPI_E_NOT_FOUND. I have checked that the necessary entries in MAPISVC.inf file is there and the two .dll files , minet32.dll and inetab32.dll is also there.any idea why this error could have occured ?
Actually the original .inf file in that machine didn't jave the entries.So i took the .inf file of a different machine..and put it there.Does that make it a problem ?
Kane
"Some guys hack just to get themselves a girlfriend.What a pathetic reason , huh?"
|
|
|
|
|
Dears:
I've upset problem in my ISAPI filter, when i adding this bulk of Code on
OnPreprocHeaders() fucntion , when i open the page the IIS is crashed
with the following error message:
Microsoft Visual C++ Debug Library:
****************************
Debug Error!
Program : C:\Windows\system32\inetsrv\inetinfo.exe
This application has requested the runtime to terminate it in an unusual
way.
Please contact the application's support team for more information
(Press Retry to debug the application)
[Code]
CDatabase dbConnection;
dbConnection.Open("ODBC;DSN=MyDSN;server=mosaicserver;uid=sa;pwd=;database=U
sers");
CRecordset dbRecord(&dbConnection);
//SQL Select Statement
char Sql[1024] = "SELECT ClientID FROM Clients WHERE ClientID = '";
strcat(Sql,"000000000402");
strcat(Sql,"'");
dbRecord.Open(CRecordset::forwardOnly,Sql,CRecordset::none);
//I just dump to file to indicate the process is done well
CStdioFile file("C:\\name.txt",CFile::modeWrite | CFile::modeRead);
file.WriteString(Sql);
file.WriteString("\n--------------------\n");
SetFilePointer(file.m_hFile,0,0,FILE_END);
file.Close();
I Execute above bulk of as separate MFC Dialogue application and run without
any problems ,,Why the ERROR occured in ISAPI??
Best Regards
|
|
|
|
|
Are you sure that the IIS process has permissions to write to the root of the C: drive? You aren't doing any error checking in the file writing code, and CStdioFile::WriteString will throw an exception (unhandled in your case) if the write operation fails. I'm sure you, running a dialog app as an interactive user, do have permission to write to the drive, which is why it works when you run it that way.
|
|
|
|
|
Dear:
yes, because I did before in same function this bulk of code :
[Code]
//Get the header informaion
BOOL bStatus = pfc->GetServerVariable("ALL_HTTP",Buffer,&BuffSize);
CStdioFile file("C:\\log.txt",CFile::modeWrite | CFile::modeRead);
file.WriteString(Buffer);
file.WriteString("\n--------------------\n");
SetFilePointer(file.m_hFile,0,0,FILE_END);
file.Close();
then i see the Header contents in log.txt without any problems.
but when add the code the relates to Database IIS Crashed!!!!
I dont know why?
The page i have done in .NET (user.aspx) has 3 images 2 buttons and two textboxes ,so for each one the page will do request to IIS ,does that cause the problem? because on each request i open,retrieve information ,and close the database connection.
Thanks
|
|
|
|
|
Dear:
Moreover i tried to debug the ISAPI DLL , the unhandled exception occured at this statement
dbConnection.Open("ODBC;DSN=MyDSN;UID=sa;PWD=;database=Users");
the Message Flaged after excuting above statement
**************************************************
Unhandled exception at 0x7c57e592 in inetinfo.exe: Microsoft C++ exception: CDBException @ 0x00dae950.
Why this happened?
Thanks
|
|
|
|
|
Is MyDSN a user DSN or a system DSN? I suspect that CDatabase::Open is throwing an exception. Should should be catching that, and seeing what the error is.
|
|
|
|
|
Dear :
MyDSN is found in User DSN and File DSN, and after debugging the exception raised is:
Unhandled exception at 0x7c57e592 in inetinfo.exe: Microsoft C++ exception:
CDBException @ 0x00dae950.
this occured after Open() is executed for database connection.
Regards
|
|
|
|
|
Heloo:
I made TRY...CATCH(CDBException,p)...END_CATCH
and dump information to file i got this message
Only SQL_DRIVER_NOPROMPT is allowed when connection pooling is enabled
--------------------
I know where is the problem now.
Regards
|
|
|
|
|
I have been trying to disable Ctrl Tab in my application and its not working
properly. CAn anyone help. Here is what i am doing
<br />
BOOL CMultiApp::PreTranslateMessage(MSG* pMsg)<br />
{<br />
if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_CONTROL) <br />
{<br />
OutputDebugString("Control IS PRESSED");<br />
<br />
if(::GetKeyState(VK_TAB) & 0x80000000 )<br />
{<br />
OutputDebugString("Control TAB IS PRESSED");<br />
return FALSE;<br />
}<br />
}<br />
return CWinApp::PreTranslateMessage(pMsg);<br />
}
Omar Alvi
|
|
|
|
|
I am design a program's interface,now I want to make the background of CListCtrl transparent,but I dont know how to implement it,please help me!
hiall
|
|
|
|
|
On Win2K and above you can use SetLayeredWindowAttributes()
This link might help
Making any application transparent in Windows 2000/XP
[^]
NOTE: You can apply this to any window. Including the CListCtrl.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
List is invalid
- Michael Haephrati מיכאל האפרתי
|
|
|
|
|
i want to write a windows service.
i tried to tried one. there is 2 .cpp file and 1 .h file. the exe is created but there is runtime error. actually i opened a WIN32 Application project and then added the files to the project and then created the executable.
what is the correct way to create a windows service app.
please send some links?
|
|
|
|
|
Hi,
Why dont you use the App Wizard to create a new ATL COM AppWizard and from the list select Service(EXE). The AppWizard handles all the interface with the Service Control Manager. All that you need to do is add code in the Run() function.
Hope this helps you.
Regards,
Mahadevan.
|
|
|
|
|
HI,
Wt is the difference between Static link library and Dynamic link library.
and how can we create them.
thanx
Regards.
|
|
|
|
|
Hi,
Static libraries are included at compile time, and dynamic libraries are loaded at run time. Dynamic libraries are the .dll files you see around windows directories.
To create the libraries in VC6 use the AppWizard. Static libraries are the easiest to use, just create a dependancy on the workspace that needs to use the library. The workspace will take care of including the library code, etc.
Dynamic libraries are a bit harder to use, but once you have used them for a while they become easier. You can either create MFC dll's or Win32 dll's. Creating them through the AppWizard will give some eg code on how to use them.
I hope this helps
cheers,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proff programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
# 1
Static libraries are linked at compile time. Dynamic
libraries are linked at runtime
# 2
static library is faster than dynamic library
# 3
above answer is correct and..
the excutable exe size will be larger when we build exe
with static library compared to dynamic library
# 4
Above answers are correct. In case of Dynamic Library your
executable will look up for the code at run time. E.g. when
running some exe it looks for help from some .dll files
provided by windows operating system. So we call this
dynamic linking.
# 5
The static linked library causes the corresponding information from libraries to be included in the executable DLL on the other hand inserts virtual address of memory. Thus the size of static linked file is larger than a static linked file. If we use dynamic linking the updates in library will also be effect the behavior of the file while not in static linking. Due to this reason dll is better but it can also sometimes make the program faulty due to library update.
|
|
|
|
|
Suppose i have a string like
CString csPath = "c:\\windows\\test.exe -parm1"
or
CString csPath = "c:\\windows\\test.exe /parm1"
now to test whether test.exe exists or not
i can't just use csPath and call GetFileAttributes that will fail because of the commandline arguments
i will have to extract the application path from the full command line which will be tedious(the examples above are easy but there are more complex ones like:
C:\WINDOWS\ISUNINST.EXE -f"C:\Program Files\Adobe\Photoshop 5.5\Uninst.isu" -c"C:\Program Files\Adobe\Photoshop 5.5\Uninst.dll" )
any help suggestions are welcome
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
http://www.mastishk.com
|
|
|
|
|
PathRemoveArgs() should help
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Why not use:
TCHAR szDrive[_MAX_DRIVE];
TCHAR szDir[_MAX_DIR];
TCHAR szFname[_MAX_FNAME];
TCHAR szExt[_MAX_EXT];
::_tsplitpath(csPath, szDrive, szDir, szFname, szExt);
Then, just check to see if you have the filename and extension in szFname and szExt.
|
|
|
|
|
if i want to access value of the textboxes in previous dialog (for both modal and modeless) into the new dialog
veda
|
|
|
|