 |

|
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|

|
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|

|
Hi,I need to open a httpfile by Proxy Server,but the UserName and Password I set always fail,I don't know why,I tried many times,I don't know how to do,Can you have any ideas.
Here is My code:
CString strURL = _T("http://www.kkkk.com/");
CInternetSession Session(_T("Get Xml"));
CHttpFile *lpFile = NULL;
try
{
//set proxy info
char sProxyList[MAX_PATH], sProxyName[64],sProxyPassw[64];
strcpy(sProxyName,"mmm");
strcpy(sProxyPassw,"mmm");
INTERNET_PROXY_INFO proxyinfo;
proxyinfo.dwAccessType = INTERNET_OPEN_TYPE_PROXY;
proxyinfo.lpszProxy =_T("192.168.0.1:8080");
proxyinfo.lpszProxyBypass = NULL;
Session.SetOption(INTERNET_OPTION_PROXY,(LPVOID)&proxyinfo,sizeof(INTERNET_PROXY_INFO));//Success
if (! Session.SetOption(INTERNET_OPTION_PROXY_USERNAME, sProxyName, strlen(sProxyName)+1))
{
DWORD ret = GetLastError();//Always return 12018.Why?
}
if (! Session.SetOption(INTERNET_OPTION_PROXY_PASSWORD, sProxyPassw, strlen(sProxyPassw)+1))
{
DWORD ret = GetLastError(); //Always return 12018.Why?
}
}
lpFile = (CHttpFile*)Session.OpenURL(strURL,1,INTERNET_FLAG_TRANSFER_ASCII|INTERNET_FLAG_RELOAD|INTERNET_FLAG_DONT_CACHE);
if (lpFile != NULL)
{
while(TRUE)
{
char szBuff[1024] = {0};
if ( lpFile->Read(szBuff, 1024) <= 0)
{
break;
}
strContent += szBuff;
}
}
}catch(CInternetException* pEx)
{
TCHAR pszError[64];
pEx->GetErrorMessage(pszError, 64);
strErrorMsg = pszError;
pEx->Delete();
}
delete lpFile;
lpFile = NULL;
Session.Close();
|
|
|
|

|
Hello, i have a question about the MSXML library. I fail to find how exactly they read the XML Document when its already loaded into memory. If i look for XML nodes do they read the whole document from top to bottom until find it or its something with hash tables.
My problem is that i have to remove some elements for existent XML document and add it in another. I was wondering which is better(according to speed) to keep the XML Nodes in std::vectors and remove the needed items and put them in the new XML Document and this only with 2 read/write operations on the XML Document or i should get the first part of the items do whatever i have to do with them and then take the next part and so on. This will cause for at least 8 times reading the existent XML Document and getting XML NodeLists out of it. The problem here is that the first XML Document can be really big.
I think its better to read the information only once and do what i have to do with it and then write it in the new XML Document. At least i think its gonna be faster but i am not sure exactly how MSXML does the operations on the XML Document.
Thank you for your help.
|
|
|
|

|
I want to make an Active X ctrl that communicates with a device and then sends data to main program. I want to know that Does activex work as seperate process. Does main program waits on ActiveX ctrl or I can do sperate processing simultaneously in my main program.
Thanks in advance.
|
|
|
|

|
I am using vc++ 6.0. I Have made an unlicensed activex ctrl application from app wizard (MFC activeX ctrl wizard for generating random drawing). When I am testing this Activex by ActiveX control test container, all functions are working fine, but when I am testing it with dialog application, On calling any method of ActiveX it is giving error debug assertion failed. Program ......
File: winocc.cpp; line: 345
I am making an object of this ActiveX ctrl wrapper class in my testing dialog application and then calling method defined in this ActiveX ctrl.
My code:
CNewSquiggleAcX m_ClNewSquigg;
CFileDialog m_ldFile(TRUE);
// Show the File open dialog and capture the result
if(m_ldFile.DoModal()== IDOK)
{
CString m_sResults;
m_sResults = m_ldFile.GetFileName();
//m_ClNewSquigg.GetSquiggleLength();
m_ClNewSquigg.LoadDrawing(m_sResults); // Error comes in this line calling any activex function
}
Calling any method of this self created unlicensed ActiveX ctrl is giving error.
Please help.
|
|
|
|

|
I need to achieve a functionality but do not know how to start please guide:
Functionality:
USB Data Card (like internet data card) is attached with system A, system A is recognising device as USB device but I need to use that card using system B which is having all drivers of data card.
How to achieve it?
|
|
|
|

|
Hello Everyone,
I need a function to implement zero copy approach.Can anyone provide me some examples or suggestions about this?
|
|
|
|

|
When I try to compile a piece of code using the Intel Compiler, I get this error:
error: declaration may not appear after executable statement in block
I know I shall have all the declaration at the beginning of my code, but I'm eager to know why this should raise an error. GCC and the VS Compiler didn't give any errors.
Thanks in advance.
modified yesterday.
|
|
|
|

|
No debuggers, well, none here anyway, and none as good as I have used on Windows, so it is printk() debugging. A 20 minute full build needed to get any new code in and then it takes 10 minutes to reflash the OS image on the device.
Never have I been forced to work so slowly.
Windows? Different matter. Windbg, live embedded debugger, automatically sucks the newly built module off the host when the target boots, public symbols, full stack and disaasembly on a crash,
I am going to have to put something together for linux/ARM like Windbg....
==============================
Nothing to say.
|
|
|
|

|
Now, I have a VC++ project which will occupy 1.5 G memory(the peak value), and then it will give back memory in 5 minutes. But, I want to optimize the memory usage, because 1.5 G is too huge. Besides, I'm rather sure there are no memory leaks in my codes, I have tested my codes with 3 tools(PurifyPlus, Debug Diagnostic and CMemoryState function).
Anybody can help me? Or are there some tools to help me to do that?
Again, I must emphasize 'there are no memory leaks in my codes, I'm rather sure'. So, don't mention 'memory leaks' in the comments.
PS: I'm using Visual C++ 2010. And my project is made up of about 1400k lines of code.
modified yesterday.
|
|
|
|

|
I am trying to enumerate processes and WriteProcessMemory. I get the following errors on compilation in Visual C++. I just don't do anything related to TOKEN and all. How to solve the error ?
error C2061: syntax error : identifier 'TOKEN_INFORMATION_CLASS'
error C2061: syntax error : identifier 'PTOKEN_PRIVILEGES'
error C2061: syntax error : identifier 'PTOKEN_GROUPS'
error C2061: syntax error : identifier 'TOKEN_TYPE'
in file c:\program files\microsoft sdks\windows\v6.0a\include\winbase.h
|
|
|
|

|
***** What I want is I should get exact no of entries and filenames as the no of files copied..***** When I copy files in the monitored directory through 4 cmd's all with copy command copying files from windows, system32, c:\, d:\ directory at a time.. this function ReadDirectoryChangesW() does not give correct output. It misses many files entries and also shows repetitive filename as file added and then modified. It is all because till the system writes the file completely, it continuously keeps giving the notification too. so we have multiple entries for same file. ***** What I want is I should get exact no of entries and filenames as the no of files copied.. So I think if I hook CopyFile/CreateFile(A/W) API, then I can trace all the files created/copied in c:\temp (putting c:\temp as the filter).. Please help.. Thanks in advance..
|
|
|
|

|
I am getting the following error
error RC2135: file not found: STRINGTABLE
error RC2135: file not found: 0xF000
1>
error RC2135: file not found: 0xF001
1>
None of the items pointed to by the resource compiler are files
I am at a loss
MSDN states for this error The file specified in the Resource Compiler command line was not found
I did a build from Visual Studio Professional 10.0
I don't know what is on the resource compiler command line
|
|
|
|

|
Hi, I am using ATL::CAxWindow for hosting some Activex control in my mfc mdi application. How do I use the scrollbars of an atl::CAxWindow ? The code I used to create ATL CAxWindow. CAxWindow m_AxWnd; CMDIChildWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, pContext); AtlAxWinInit(); RECT altRect; GetClientRect(&altRect); m_AxWnd.Create(m_hWnd, altRect, NULL, WS_CHILD|WS_VISIBLE|WS_HSCROLL|WS_VSCROLL); m_AxWnd.CreateControl(L"Some ActiveX control"); Thanks,
|
|
|
|

|
My legacy app. uses this message handler to do button enabling / disabling. However it gets called very frequently (eg on mouse move).
is there any way of filtering / controlling the messages that cause this function to get called? I can't see why I'd want to do anything with my toolbars & icons in response to UI messages anyway.
Thanks
|
|
|
|

|
Hello there
I am working on a C++ MFC app that has a user login option and the software will store upto
15 passwords used by a user.
Now i want to store each password used by a user in a string array and make sure that the user
doesn't use an old password when updating the password.
i.e., password once used cannot be re-used and an existing password will expire after a set number of days.
The question is what kind of collection class i need to use for efficient management of old passwords?
CArray?CList? CString array?
Any sample code will help.
Thanks in advance.
|
|
|
|

|
Hi, I have written a code in C++ which works on the "POINT" user defined type i.e. POINT = (x,y).
I am giving input in int form, it is converting it into point might be using "template". I am retrieving these point from another function which is a header file of mine.
Now the problem is, I am calling this function in NS-3 software/program, I am unable to convert this point form into integer.
* Can i return more than one value from a function, because point has two values i.e. X and Y.
Please help me out.
|
|
|
|

|
I am trying to create a dialog MFC application that reads the cursor position anywhere on the screen, finds the colour of the pixel at that location and reports the information back to the dialog application.
I have tried SetCapture and I must be doing something wrong because the cursor location stops reporting as soon as the cursor leaves the client area of the dialog. I have also looked at the "Screen Color Picker" by Florin Vasilescu. That uses an OnTimer function that allows me to read the screen location, but does not report mouse actions (LBUTTONDOWN) so that I can read the pixel at the cursor location.
I have also tried using SetWindowsHookEx and defining the MouseProc (as described by Vesi in the CodeGuru article "Modal dialog and outside mouse control". That wasn't successful. If I use the WH_JOURNALRECORD hook ID as described there appears to be an indeterminate delay between any mouse (or keyboard) action and interaction with screen objects. If I use the WH_MOUSE no mouse actions are detected.
Could someone help me with how to either properly set SetCapture() or point me to where I might discover how to read mouse actions outside the dialog box? I'm happy to supply code, but at this point it's a bit of a mess since I've been trying everything.
Thanks for any help you may be able to provide. Much appreciated.
|
|
|
|

|
I found if set TTF_TRACK flag to CTooltipCtrl, SetDelayTime doesn't work anymore, so the tooltip won't disappear automatically. I want to show the tooltip just below specified control, and expect it to disappear after a few seconds(the time can set with SetDelayTime). Anybody can help me?
Here is my steps to construct tool tip:1. Add member variable
CToolTipCtrl m_tooltip;
2. override PreTranslateMessage
BOOL CPF_GetSetNameDlg::PreTranslateMessage( MSG* pMsg )
{
switch (pMsg->message)
{
case WM_KEYDOWN:
case WM_SYSKEYDOWN:
case WM_LBUTTONDOWN:
case WM_RBUTTONDOWN:
case WM_MBUTTONDOWN:
case WM_LBUTTONUP:
case WM_RBUTTONUP:
case WM_MBUTTONUP:
case WM_MOUSEMOVE:
m_tooltip.RelayEvent(pMsg);
break;
}
return CDialog::PreTranslateMessage(pMsg);
}
3. OnInitialDialog
BOOL CPF_GetSetNameDlg::OnInitDialog()
{
CDialog::OnInitDialog();
//tooltip
EnableToolTips();
m_tooltip.Create(this , WS_POPUP | TTS_NOPREFIX | TTS_BALLOON);
m_tooltip.SetDelayTime(TTDT_INITIAL, 0);
m_tooltip.SetDelayTime(TTDT_AUTOPOP, 30000);
m_tooltip.SetDelayTime(TTDT_RESHOW, 30000);
m_tooltip.AddTool(GetDlgItem(IDC_SETNAME), _T(""));
m_tooltip.SetMaxTipWidth(600);
}
4. Control to show tool tip
if(bShow)
{
m_tooltip.UpdateTipText(_T("Hello, money!"), pWnd);
CToolInfo sTinfo;
m_tooltip.GetToolInfo(sTinfo, pWnd);
sTinfo.uFlags = TTF_TRACK;
m_tooltip.SetToolInfo(&sTinfo);
CRect rect;
pWnd->GetWindowRect(rect);
m_tooltip.SendMessage(TTM_TRACKPOSITION, 0, (LPARAM)MAKELONG(rect.left, rect.bottom));
m_tooltip.SendMessage(TTM_TRACKACTIVATE, TRUE, (LPARAM)&sTinfo );
}
|
|
|
|

|
I have this code:
if(m_Bitmap.GetSafeHandle())
m_Bitmap.DeleteObject();
HBITMAP hBitmap = (HBITMAP)::LoadImage(NULL, lpszPathName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION);
if(NULL == hBitmap)
{
CString sMessage;
const DWORD dwError = ::GetLastError();
sMessage.Format(_T("Failed to load '%s' file. Reason: %s\n"), lpszPathName, GetErrorString(dwError));
AfxMessageBox(sMessage, NULL, MB_ICONERROR);
return FALSE;
}
m_Bitmap.Attach(hBitmap);
and work ok, but on the big bitmaps, I get:
Not enough server storage is available to process this command
ok, I read this one[^], and I modified the "IRPStackSize" value to 0x19 (25 decimal), not working ... hoe can I get rid of this error ?
modified 12-Jun-13 4:37am.
|
|
|
|

|
Hello Friends
I am using SetupDigetRegistryProperty to access USB Devices.
So,regarding that I was trying to access Property SPDRP_LEGACYBUSTYPE which is described like this
Quote: SPDRP_LEGACYBUSTYPE
The function retrieves the device's legacy bus type as an INTERFACE_TYPE value (defined in Wdm.h and Ntddk.h).
I tried to get this value in char ,it returns some special character. I tried to catch in DWORD,it returns some number.
DWORD DataT;
LPTSTR buffer = NULL;
DWORD buffersize = 0;
SetupDiGetDeviceRegistryProperty(
hDevInfoSet,
&DeviceInfoData,
SPDRP_LEGACYBUSTYPE,
&DataT,
(PBYTE)buffer,
buffersize,
&buffersize)
Any Ideas?
Regards
Y
|
|
|
|

|
Hi,
I working on a plugin system for a MFC C++ application. So I started with a small plugin DLL with a simple function creating an object of a class with virtual functions and returning that object to the caller. The object is created on the heap and actually a pointer to the object is returned.
In the main application a function loads the plugin (LoadLibrary), searches the exported function (GetProcAddress) and executes the function. As result the created object is available, as expected. So far so good.
Btw: the class is already declared in a different DLL linked by both the main application and the plugin DLL.
Next I want to unload the plugin with FreeLibrary.
That leads to the problem of a corrupt vftable of the created object. I found out, that the __vfptr is in the memory of the plugin DLL and so unloading the DLL destroys that memory and the __vfptr is not usable anymore.
Is there any way to change that behaviour?
with kind regards,
Joerg
|
|
|
|

|
Creating webbrowser as below
hret=CoCreateInstance(clsid,NULL,CLSCTX_ALL,IID_IUnknown
,reinterpret_cast<void**>(&m_pUnknown));
hret=m_pUnknown->QueryInterface(IID_IWebBrowser2,(PVOID *)&m_pBrowser);
ASSERT(SUCCEEDED(hret));
but when i say
HRESULT hret = m_pBrowser->Navigate2(varURL,&noArg,&noArg,&noArg,&noArg);
its opening new IE window on WIn7. But in Xp sys its not happening like that. I dont want to open new IE window
Any one has any idea why it is opening on new IE window on Win7
|
|
|
|

|
Hi,
I am working on a project in which I use DirectShow to Play / Pause / Stop the video. I am using progress bar which increments along with the video. Now I want to use Slider bar instead of the progress bar which should increment along with the video. Also user should be able to control the video using slider (move forward / backward). I had used timers in which I am incrementing the progress bar.
How to use Sliders so that while video is playing, slider should increment along with the video showing the progress of the video.
Anybody have any idea or any sample code for the same.?
Regards,
Mbatra
|
|
|
|

|
Hi.. I have implemented ECC algorithm in C++ and it is working fine with g++ compiler... I need to apply this program to network simulator - 3. Complier of NS-3 is "./waf", there it is not building and it is giving countless errors mainly regarding "ostream".
there is a line regarding ostream in my header function....---
// ostream handler
template<int T>
friend ostream& operator<<(ostream& os, const FiniteFieldElement<T>& g)
{
return os << g.i_;
}
|
|
|
|

|
Hi,
I have a application developed in VC++(MFC).Its a MDI application.I am very new to Unit testing. So i need to use a Unit testing framework\tool for it's unit testing.
Kindly any one please suggest any Unti testing tool and also if you have any demo of that suggested Tool's implementation for MFC code, Then it will be easier to catch easier . If that testing tool is a Free like GoogleTest(gtest) then it'll be more prefarable.
I searched a lot, but i didn't get idea as per my requirement(exspecially for MFC code unittesting).So need help.Please suggest.
Thanks
|
|
|
|

|
Hi
I am getting the above mentioned error in all my .cpp files I don't see any where I am using DAO classes
maybe they are some how included in stdafx,h yes I am compiling as 64 bit code
Thanks
|
|
|
|

|
Suppose this scenario: I refer to a third party lib in my C++ app, but I don't want the third party lib to use my physical memory at all. Instead, I want it to only allocate memory from hard disk. I don't know source codes of third party lib, however as it run in the Windows platform, so I think it's possible to control the memory management with Win32 API.
My problem is how to avoid thrid party lib to allocate memory from physical memory.
Am I going in the wrong direction? Anybody can help me?
PS: I'm using Visual C++ 2010.
|
|
|
|

|
I want to convert a binary file (.dll) to a base64 string and store it in my application, then write it to the hard disk using the stored base64 string but i am failing miserably. any help is appreciated thanks.
edit: basically, exactly what this site does: http://www.motobit.com/util/base64-decoder-encoder.asp[^]
|
|
|
|

|
CString ftitle; fscanf_s(f_ptr_seed_inf,"%s\n",ftitle[ifl].GetBuffer(MAX_PATH)); ftitle[ifl].ReleaseBuffer(); I got error message: Unhandled exception at 0x776015de in MSW_Vib_Model.exe: 0x00000000: The operation completed successfully. Please help
|
|
|
|

|
I have read a lot about abstract class, but still have questions, as I have not really used in my c++ code practically.
What is the use of abstract class ? Any sample I can take a look at ?
Thanks.
|
|
|
|

|
I am creating an application that is multithreaded and all the threads are accessing the same shared memory. The data coming into the memory should be processed in sequential order. Like if 1,2,3,4,5 comes in the memory then it should be processed in same order.
I have used critical section around my memory, but I still get into a race condition where data is not grabbed by the thread in sequential order.
Am I missing anything else to prevent threads from race condition?
Thanks.
ACpp
|
|
|
|

|
Can I run two command line instructions on a file in a VS2008 project? I can set each command line instruction up as a rule in the .rules file (see below) but can only select one rule or the other not both. From the input files properties in VS2008 Project View I can select GraphVizSVGRule or GraphVizPNGRule. I want to create both a .svg file and a .png file from the input .gv file (GraphViz)
="1.0" ="utf-8"
<VisualStudioToolFile
Name="GraphViz Rule File"
Version="8.00"
>
<Rules>
<CustomBuildRule
Name="GraphViz Dot to SVG Rule"
DisplayName="GraphVizSVGRule"
CommandLine="dot.exe -T svg "$(InputDir)\$(InputName).gv" -o "$(InputDir)\images\$(InputName).svg""
Outputs="$(InputDir)\images\$(InputName) .svg"
FileExtensions="*.gv"
ExecutionDescription="builds svg file"
>
<Properties>
</Properties>
</CustomBuildRule>
<CustomBuildRule
Name="GraphViz Dot to PNG Rule"
DisplayName="GraphVizPNGRule"
CommandLine="dot.exe -T png "$(InputDir)\$(InputName).gv" -o "$(InputDir)\images\$(InputName).png""
Outputs="$(InputDir)\images\$(InputName) .png"
FileExtensions="*.gv"
ExecutionDescription="builds png file"
>
<Properties>
</Properties>
</CustomBuildRule>
</Rules>
</VisualStudioToolFile>
|
|
|
|

|
Hello Friends
Application is Compiled on VS2010 in WinXp and it is crashing on Win8 when ivoked by Menu not crashing by shortcuts.
Isn't issue with running application on 64 bit Machine ?
Reagrds
Y
|
|
|
|

|
hi guys.. I have written the below code in C. I have 3 bits in three different integer variables. How can I concatenate those values assuring that i need only binary values (1/0).
#include <stdio.h>
#include "manojturbo5.h"
#include "bitsconv.h"
#include "manojencoder2.h"
void main()
{
int message,interleaver,u,p,q,r,final,result,i;
printf("Enter the message\n");
scanf("%d",&message);
bitconv (message);
for(r=0;r<32;r++)
{
u = array[31-r];
p = encoder(array[31-r]);
q = encoder2(array[31-r]);
printf("%d\t %d\t %d\n",u,p,q);
}
return;
}
|
|
|
|

|
I got this error message when I debug: Unhandled exception at 0x77a915de in MSW_Vib_Model.exe: 0x00000000: The operation completed successfully. from these code segments: // ifl=0; do { { // fscanf_s(f_ptr_seed_inf,"%lf %lf %s\n",&sd_dis[ifl],&time_onset[ifl], ftitle[ifl].GetBuffer(MAX_PATH)); ftitle[ifl].ReleaseBuffer(); } ifl += 1; } while (!feof(f_ptr_seed_inf)&&(ifl<120)); nfile=ifl; // This is my input file: 4171.000 0.28600 ECO61_4171_Hole1_seeds.txt 4157.000 0.24600 ECO61_4157_Hole2_seeds.txt
Please help me.
|
|
|
|

|
Hi All, I have a BOOST test case as below BOOST_AUTO_TEST_CASE( BoostUnitTestSample ) { // seven ways to detect and report the same error: BOOST_CHECK( add( 2,2 ) == 4 ); // #1 continues on error BOOST_REQUIRE( add( 2,2 ) == 4 ); // #2 throws on error somefunction_whichleaksmemory();----------->memory leak function. if( add( 2,2 ) != 4 ) BOOST_ERROR( "Ouch..." ); // #3 continues on error }
I want to programmatically detect the memory leak in function somefunction_whichleaks() and get information like line number and filename where the leaked occurred. And most importantly I should know in which test case this leaked occured.May be I would like to have a dump of all this information in some file. Does anybody knows a solution to this?
|
|
|
|

|
I am not able to understand the output of below lines.
As per my understanding output should be 8 because we are subtracting int address which is having 8 byte diffrence but output is coming 2. Please expalin.
int a[]={5,10,15,20};
int d = &a[2]-&a[0];
|
|
|
|

|
Hi,
i am not able to get Date value from ADSI directory
VARIANT var;
hr = ADsOpenObject(path,NULL,NULL,0, IID_IADsUser, id**)&pUsr);
HRESULT h1= pUsr->Get(L"pwdLastSet", &var);
INT8 bb=var.date;
This code is not working pwdLastSet type is integer8 .it stores date value how can i get date value from adsi with c++ code please help anyone
|
|
|
|

|
hello Friends
I am accessing USB Devices through SetupDiCalls. I am able to get USb printers'Device Path to communicate with them and its working fine. I want to know that How can I access their name also using SetuDiCalls so that I can differentiate between USB Printer Devices to with whom I have to communicate.
I tried EnumPrinters to get Printers name but that doesn't provide device Path for which we needed to pass to createFile fn for communication with USB Printer. And Nothing else I found common between ENumprinter returns or setupDicalls so that I will access from their.
Any Ideas ?
Thanks & Regards
Y
|
|
|
|

|
The following code returns isMatch true in VS 2008 not in VS 2010
CString strPattern = _T("(\\+|00)\\s*\\d{2}(\\s?\\d{3}){2}\\s?\\d{4}");
CString strValue = _T("0044 207 689 0000");
CT2CA pszFind(strPattern);
const std::tr1::regex pattern(pszFind ,std::tr1::regex_constants::nosubs | std::tr1::regex_constants::ECMAScript);
CT2CA pszData(strValue);
std::string strSearch(pszData);
isMatch = regex_search(strSearch.begin(), strSearch.end(), pattern);
Any idea why?
Thanks in advance
|
|
|
|

|
Hi,
I am working on a project in which I am using DirectShow to play audio and video files. I have used a volume button, the state of which indicates whether Audio is On/Off. On clicking this button, I want to mute the sound from the speakers while video file continue playing. Is there any method to do so.?
Your help will be appreciated.
Regards,
Mbatra
|
|
|
|

|
Hi,
I am working on a project program that have the popup progress bar with "continue" and "pause" buttons in the dialog. I have the problem to pause and to continue the progress. For example, when the progress dialog starts, the user click on the "pause" button, the progress bar must be paused until the "continue" button is pressed but I don't know how to pause the progress when the pause button is pressed and how to continue the progress bar when the continue button is pressed.
Any help will be appreciated.
Regards,
Mbatra
|
|
|
|

|
Hi,
I want to know whether opcode can give me the messages besides triangle. As mesh which is defined in the opcode is consist of triangles, but most of my model is constructed using polygons, so before my collision qurey, I have to transform the polygons to triangles, but i want to know wether i could know which polygon the triangles detected are belong to. if the anwser is yes, how can i get the message?
|
|
|
|

|
Hi all,
I have a program that calls magnification.lib in windows 7, windows 8.
(I'm calling #include magnification.h)
But we know this library doesn't exist in windows XP.
How can I ignore this library when opening the application in windows XP?
|
|
|
|

|
Hi,
I am using DirectShow to play, pause audio / video files. Now I want to implement mute functionality for any audio / video file. Is this possible using DirectShow or I have to use any other method.?
I want to make sound off from a currently playing video file, When user clicks on the sound button, audio should not be heard.
Any help will be appreciated.
Regards,
Mbatra
|
|
|
|

|
Hi,
I have created a property sheet and it contains 3 pages. I want to disable any of the page based on some condition.
Is there any method of disabling pages in a property sheet.?
Any help will be appreciated.
Regards,
Mbatra
|
|
|
|

|
Hi everybody, I want to interface a win32 console application with arduino uno via serial port. Can someone help me ?
Thanks a lot.
|
|
|
|

|
Hi, I have implement a D-Flipflop in C++, I.e. 'D' as a input and 'Q' as a output with 'clk' as a conrol input.
When clk = '1' and D = '1/0' then Q = D;
How to realize clock in C++. It should be of 50% duty cycle using the system frequency. is there any function to use the system clock in program.
|
|
|
|
 |