|
If you are talking about the visual studio service pack, you can open visual basic and select Help>About. It shows the service pack version but if u have only visual c++ installed, I have no idea
Regards
Pradeep
Between the great things we cannot do and the small things we will not do, the danger is that we shall do nothing
|
|
|
|
|
Perhaps you meant to reply to Abhi Lahare.
david_gilmour wrote:
If you are talking about the visual studio service pack, you can open visual basic and select Help>
Why would I want to open VB to know what service pack is installed?
david_gilmour wrote:
...u have only visual c++ installed, I have no idea
Did you know read my reply in its entirety?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Help:
I'm trying to write an application on Visual Studio .NET 2003 that uses the Video for Windows AVIFile methods to read an AVI DV file and grab some frames from it. It's been working fine, except I can't seem to access the whole of a larger file. If I use AVIFileInfo after AVIFileOpen then the length of the file given (in frames) is smaller than the actual length. If I then open the video stream and use AVIStreamLength I get the actual file length. However, if I try to use AVIStreamGetFrame to extract frames it returns NULL for any requests for frames beyond the length given with AVIFileInfo!
Some messing about has shown me that the cut-off point seems to be around the 1GB mark(approx 4m45s for DV). If I encode using a different scheme (say, Cinepak codec) then it displays well beyond the 5m mark (although the file I checked this on was still less than 1GB, so I need to generate a bigger file to find if the problem resurfaces with a different codec - will do this overnight).
I can't find any reference anywhere to a restriction with reading avis with AVIFile, but can't think what else the problem could be. As far as I know both AVIFileInfo and AVIStreamLength extract data without the use of a codec so it's not a problem with the specific codec that I'm using. Having said that, I know that Video for Windows is a bit outdated and I should really be using DirectShow, so maybe it's because the software is too old...
Has anyone else had this problem or have any ideas?
jOP
|
|
|
|
|
Hi All!
I am getting debug assertion error exactly at the fourth time i open Webbrowser Control, consistently, everytime. CAN ANYONE HELP?
Any help on this regards will be appreciated !
I have two components, one is a MFC Application and the other is a Dll. I have a Webbrowser control in the dll, that is accessed by the MFC App. The following code calls the Webbrowsercontrol, which is in the dll, by the foll code:
"CWebDialog* wb;
wb = new CWebDialog();
wb->DoModal(); "
This code calls the Webbrowser control cpp, in the dll, whose Initdialog has the foll:
BOOL CWebDialog::OnInitDialog()
{
USES_CONVERSION;
CoInitialize(NULL);
try
{
hf_WriteLog("ONINITDLGWEB");
COleVariant vaURL(m_strURL);
((CWebBrowser2*)GetDlgItem(IDC_EXPLORER1))->Navigate2(vaURL, NULL, NULL, NULL, NULL);
hf_WriteLog("NAVIGATED");
VariantClear(&vaURL);
CoUninitialize();
CDialog::OnInitDialog();
}
This throws an exception, every fourth time. Is that a problem with the memory allocation of the dll.. or anything, someone could help????????
Regards
angello6
|
|
|
|
|
Hello
Can anyone please help me to write a multiple column combo box program in VC++.
Thanks
Madhavi
|
|
|
|
|
My application has to launch Notepad opening within it a file produced by itself.
I've tryed with the following code but it doesn't work correctly. Notepad is open but the file is not open within it. By the way, the same command launched within cmd.exe works fine.
CString l_cstrApp = _T("C:\\WINNT\\Notepad.exe");
CString cstrCommandToLaunch. = _T("C:\\MyFile.txt >> Notepad.exe");
CreateProcess(l_cstrApp.GetBuffer(0),
l_cstrCommandToLaunch.GetBuffer(0),
NULL,
NULL,
FALSE,
CREATE_NEW_CONSOLE,
NULL,
NULL,
&l_StartupInfo,
&l_ProcessInfo);
Can someone tell me how to solve this problem ??
|
|
|
|
|
l_cstrApp = _T("C:\\WINNT\\Notepad.exe C:\\MyFile.txt");
|
|
|
|
|
or better way to use
ShellExecute
ShellExecute(NULL,"open","Notepad.exe","filename.txt",NULL,SW_SHOWNORMAL);
-----------------------------
"I Think this Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
"C:\\MyFile.txt >> Notepad.exe" does not work. Use the following:
CString l_cstrApp = _T("C:\\WINNT\\Notepad.exe");
CString l_cstrCommandToLaunch. = _T("C:\\WINNT\\Notepad.exe c:\\file.txt");
ARSALAN MALIK
|
|
|
|
|
OK ! Now It works!
Thanks a lot to all.
|
|
|
|
|
I want to make a program that administrates some computers in a network and I need to do a client server aplication. The computer server has a server program which accepts connections from the computers in the network. After a computer connects i create a thread for that certain socket and ip.
In order to send info to a computer so I can reveive something I have to do it in that thread so I need some way of storying some string variables somewhere from where they can be read. I don't think registry would be a good idea because I did this and after a while the registry fails to open the certain key I don't know why . . . I know it can be done with some mutex objects or something like this. Can someone give me a piece of code on how variables can be read.
Thank you.
gabby
|
|
|
|
|
I want to use API TransmitFile to build a C/S structure ,who can give me an example.I have written a program but client program has bug,client codes as below:
UINT ClientThread(LPVOID lv)
{
SOCKET s=(SOCKET)lv;
CFile f;
bool IsOpen=false;
char buf[1024*128]="";int count=0;
while (true)
{
buf[0]='\0';
int ret=recv(s,buf,sizeof(buf),0);
if(SOCKET_ERROR == ret)
{
CString s;
s.Format("%d",WSAGetLastError());
AfxGetMainWnd()->SetWindowText(s);
break;
}
else
{
CString str(buf,ret);
int i=str.Find(':');
if(-1 != i)
{
if(f.Open(str.Right(str.GetLength()-i-
1),CFile::modeCreate|CFile::modeWrite) == 0)
break;
IsOpen=true;
}
else if("FileTranferOver" == str)
break;
else if(IsOpen)
{
try
{
f.Write(buf,ret);
}
catch (...)
{
str.Format("%d",GetLastError());
MessageBox(NULL,str,"Error",MB_OK);
}
}
else
continue;
count+=ret;
}
}
if(IsOpen)
f.Close();
CString str1;
str1.Format("%d",count);
AfxGetMainWnd()->SetWindowText(str1);
return 0;
}
|
|
|
|
|
I am having a MFC Dll.
The settings are as follows
Use MFC in a Static Library
In Code Generation : Debug Mutithreaded DLL.
The error i am getting is
uafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___wargv
uafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
But when i change the Code generation option to
Debug Multithreaded,
i dont get any Link errors.
What is the difference and is it OK to have this option for a MFC dll.
Yuvaraj N
|
|
|
|
|
in my app, i resize property sheet to max size (SW_SHOWMAXIMIZED), but when i resize property pages of the sheet, they are not resizable.
do you know how to resize property pages??
thx
includeh10
|
|
|
|
|
Paolo Messina has written an article on this
http://www.codeproject.com/property/resizableproperties.asp[^]
Boiled down to basics, what you do is in your property sheet's OnSize handler is call GetTabControl() to get the tab control, resize the tab to the size you want, then call CTabCtrl::AdjustRect to get the size of the tab's client area. Then resize the active page to that area.
void CMySheet::OnSize(UINT nType, int cx, int cy)
{
CTabCtrl *pTab = GetTabControl();
CRect rc;
GetClientRect(&rc);
pTab->MoveWindow(rc);
pTab->AdjustRect(FALSE, &rc);
GetActivePage()->MoveWindow(rc);
}
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
it works well!
thx
includeh10
|
|
|
|
|
Which control is behind the function of offering a selection of options usually when right-clicking on whatever? Like function Open, New, Copy, etc.
I do not mean menus. For example on the VC++ screen, if I right-click on a code line, I receive the list of selections "Cut, Copy, Paste, Insert File into Project, Open Document, List Members,...".
|
|
|
|
|
This can be done using the CMenu class (CMenu is not only for menus under your title bar). Check the TrackPopupMenu function for more details...
|
|
|
|
|
Thank you Cedric, this is just what I wanted; it works fine.
|
|
|
|
|
Hi all !
I was assigned a task which I don't think is possible to do.
What I was requested to achieve is basically the following:
To cause our existing MFC (Doc/view) application to become a COM EXE server !
Is it possible at all, or am I wasting my time. If it's not possible, what approach shall I take?
I used the information which appeared under the article :
Article ID :175190
Last Review:June 29, 2004
Title : How to add ATL support to an MFC EXE
Link : http://support.microsoft.com/default.aspx?scid=kb;EN-US;175190[^]
Outcome so far : NOT Successful, meaning, the registration is not failing, but the server cannot be found by a client application (class not registered !)
As far as I understand , the article 175190 discusses the option of
embedding an "local In-process COM server" into the application, not a "remote COM EXE server".
I tried everything I know, so far with no results..
Please help,
Rubi
|
|
|
|
|
I would not try to convert an existing project. More I would take the core functionality out of the existing MFC application and add it to a new COM Server project.
Doing this you can then call the new COM server routines rather than the existing routines from your application to see if it behaves as expected.
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 Walliams (Little Britain)
|
|
|
|
|
Found the bug which was causing this not to work,please go to for in depth info :
http://www.codeproject.com/script/comments/forums.asp?forumid=1648&exp=0&select=986387#xx986387xx
Rubi
effic
|
|
|
|
|
Does anyone have an example of how to make a simple opengl32.dll? I want to catch application usage of glBegin(). So my dll must intercept the normal opengl call, keep a counter of the number of glBegins, and then call the real opengl glBegin().
I tried API highjack, but this will not work if the application loads the opengl library dynamically at runtime using LoadLibrary.
Thanks,
Max
|
|
|
|
|
use the win32 disassembler, and check the box for 'break on api calls'.
int i = 2, x = 2;
int j = x + y;
sprintf("%d",j);
4.7388937 ???
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
I made an application to browse html pages off a website. Then they added a registration requirement to the site, i.e. you need to log in every time, and I haven't been able to access their pages since. I use CInternetSession::GetHttpConnection passing the host name and login information. Then I call CHttpConnection::OpenRequest, and CHttpFile::SendRequest and read from the resulting CHttpFile object. This allowed me to display html pages in the past, but now with the login I get a 0 byte file. I think the username and password just aren't getting through, but I don't get an "access denied" html page, just a 0 byte file. Any idea what's going on and what I should do? Thanks for any help!
The relevant code is :
CInternetSession session;
CHttpFile* file = NULL;
CHttpConnection* hc = session.GetHttpConnection(Host,80,Uname,Pword);
file = hc->OpenRequest(NULL, urls[iterate], "", 1, NULL, NULL, INTERNET_FLAG_EXISTING_CONNECT );
file->SendRequest( "", 0, NULL, 0 );
|
|
|
|
|