|
Hi,
Is long double ANSI-stand legal data type? I thought short and long only apply to int?
On VS.Net /w WinXP, the sizeof(long double) returns 8,
on GCC4 /w FC4 Linux, the sizeof(long double) returns 12,
on GCC4 /w MacOS X (G4), the sizeof(long double) returns 16.
Why would every different OS return different values?
Thanks
|
|
|
|
|
I believe the standard sets MINIMUM sizes for types. For example, in VC6 at least int and long were the same thing, both were the minimum acceptable size for a long.
I don't know if long double is standard or not, but that's the answer to your other question, anyhow.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
I've read the discussion, but I still don't understand why would different OS produces different result.
For example, both my intel-P4-based PC and PowerPC-based MacOS X run GCC 4, and the result on the Linux is 12 and MacOS X is 16. Both are 32-bit processors and 32-bit OS (Macs uses the G4, not G5).
|
|
|
|
|
i need to "scan" some sites and to get some text out of the html code
my question is what is the best and the fastest way to do it
i tried to us wininet but it very slow
and i need that the scan will work fast
what can i do?
|
|
|
|
|
i used CHtmlView class, as i had to display
some site ,where i use to search the code
for small data ,
But cant say it will be faster ......
U can get the TCP/IP packet & get the
data from the packet .
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
morning,
this app runs fine on debug mode, but got access violation at the exiting dialog in release, I checked the thread, it was trying to close [CCallsmDbf::~CCallsmDbf]....here is part of the code that causing problem, but I am not sure what need to be fixed, thanks!
CCallsmDbf::CCallsmDbf(char *dbfname, int exclusive)
: CB_DBF_NTX(dbfname, exclusive)
{
if (validDBF())
{
ptrIdxName = m_csIdxFile.GetBuffer( L_tmpnam + 1 );
GetTempFileName( ".", "callsm", 0, ptrIdxName );
index_on( ptrIdxName, "ANI" );
m_csIdxFile.ReleaseBuffer();
top();
BindFieldOrdinals();
}
}
CCallsmDbf::~CCallsmDbf()
{
}
in header file,
protected:
CString m_csIdxFile;
char* ptrIdxName;
|
|
|
|
|
Hi,
ptrIdxName = m_csIdxFile.GetBuffer( L_tmpnam + 1 );
This line looks dangerous! L_tmpnam may not be initialized.
which would assign an unpredictable amount of mem. in release mode.
The memory pointed to by ptrIdxName might easily be corrupted by the
"GetTempFileName" call on the next line... the problem might only manifest itself when the class destructor deallocates the memory at object destruction time.
Why not try a simpler way of doing this instead of GetBuffer/ReleaseBuffer like...
TCHAR filename[MAX_PATH];
GetTempFileName( ,,, filename );
m_csIdxFile = filename;
Cheers,
Dave
|
|
|
|
|
But it's still crashes at the same spot.
when the access violation message show up, there were two threads [CCallsmDbf::~CCallsmDbf] and [CDialog::EndDialog], I gess the problem could be at the CDialog as well....
and it's not crash every single time of on release mode, every now and then it works......
thanks for your time!
|
|
|
|
|
Problem could be still suggested by Dave. I think one or more extra bits are accessed somewhere.
Try to keep track of character pointer used.
use strcpy() wherever needed, and with care
|
|
|
|
|
thanks for your info, here is another function that from same file, somehow, it's done deifferently.....
CFavNatDbf::CFavNatDbf(int exclusive)
: CB_DBF_NTX("DATA\\FAVNAT.DBF", exclusive)
{
if (validDBF())
{
char* ptrIdxName = m_csIdxFile.GetBuffer( L_tmpnam + 1 );
GetTempFileName( ".", "favnat", 0, ptrIdxName );
_strupr( ptrIdxName );
memmove( ptrIdxName, ptrIdxName + 2, strlen( ptrIdxName ) - 2 );
*strstr( ptrIdxName, ".TMP" ) = '\0';
index_on( ptrIdxName, "CUST_NUM + LOCATION" );
m_csIdxFile.ReleaseBuffer();
top();
BindFieldOrdinals();
}
}
CFavNatDbf::~CFavNatDbf()
{
}
void CFavNatDbf::BindFieldOrdinals()
{
}
|
|
|
|
|
I am programming a Socket enabled with SSL.I want to get certificate from a store provider.my certificate provider is a file.i downloaded the openssl and installed it.i used a command to generate certifcate request
openssl>req -newkey rsa:1024 -keyout server.key -nodes -days 365 -out server.crt<br />
with this command a certificate request (server.crt) is generated.i opened the server.crt and pasted it contents in Advance option (certificate service) to get the certificate.i got a certificate named as"certnew.cer".i opened the certificate ,there was an option "copy to file".i opted for PKCS#7 Certificates(.P7B) and named it FileStore.A file was generated named as Filestore.p7b
//this my code for certificate store
#define ENCODING_TYPE (PKCS_7_ASN_ENCODING | X509_ASN_ENCODING)<br />
<br />
HCERTSTORE m_hMyCertStore;
<br />
m_hMyCertStore = CertOpenStore(<br />
CERT_STORE_PROV_FILENAME_A,
ENCODING_TYPE,
NULL,
NULL,
_T("FileStore.p7b"));
i want to know whether my procedure is right to get the certificate from store.because i m getting error when i want
credentials for schannel
-- modified at 1:14 Thursday 29th September, 2005
|
|
|
|
|
I posted this in the general area with no luck.
Does anyone know of a way to hook into updates of the DC for the powerpoint slideshow? Can this be done from a plug-in? I did not find any info on how to implement a PPT plug-in.
|
|
|
|
|
hi i need to modify a standard mouse driver but i cant find the source anywhere
i have to write a driver that change the axis up down...is a simple task if i could find an source but i cant...
anyone know how to do a mouse driver?
i use visual c++ 6.0
|
|
|
|
|
The application I have in mind, has to sit in the background of Windows ( lets say as a Windows Service or a Taskbar app ) and scan for all the web pages that the user downloads and views using any Web Browser. Well this is only part of the application, actually the main thing, to scan for all the web pages the user visits on any browser and then process them for a certain task. So my question is, is it possible ? I mean isnt it the way Spyware and Adware runs ? But I think adware and spyware is browser dependaant and come as a plugin. Well I want it to be browser independent so thats why I suggested running the app in the background as a Windows Service or as a taskbar app.
I tried searching on the web for looking some similar projects but didnt come across any. Could u give me some leads as to how i should achieve this ?
I dont mind the programmin language I get to use. Im okay with .net or pure C++.
|
|
|
|
|
Hi
I want to start Yahoo Konfabulator, and in that Weather Widget, which is intalled on my PC, from my MFC application.
I tried using WinExec() and CreateProcess() functions. Using both I am able to start Konfabulator but not been able to start "The Weather Widget" which comes with it.
Any idea why it happens..? How to start it ?
Thanking you
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
Amarelia wrote:
I want to start Yahoo Konfabulator, and in that Weather Widget...
What are the steps to do this manually?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
maybe konfabulator offer a command line option ( or a preference file ) to start specific widgets when the app. is launched.
or maybe konfabulator contains an dev. API that let you do that.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Is it possible to get toner-level and life-meter of a desktop shared printer using win32 printer API? If not, any alternates for this.
Thanks.
|
|
|
|
|
Only if the printer's device driver provides such information. Otherwise, no. One of my printers writes a number to a .ini file indicating the ink level. The status utility simply reads that file to show the ink level as an image. Kind of cheesy but it works.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
How can I programmatically find/delete an entry in the Start Menu with the Win32 API?
Thanx!
|
|
|
|
|
Use SHGetFolderPath() to get the path to the Start Menu folder. Then use DeleteFile() .
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Thank you very much. There is also a SHGetSpecialFolderPath.
|
|
|
|
|
Hi best programmers,
Please help me with my problem.
I want to display captured streaming avi-data from webcam, but the main problem is to show the video on my dialogbox.
Actually it's very easy to get avi from webcam and I think it worked well so far, but to show in my dialogbox there is a problem.
The code I tried is as follows:
void CCamSampDlg::OnStart() //when I click on Start-button,
{ //the webcam will be activated (I see green
CRect rect; //LED turns on) and it should start showing
GetClientRect(&rect); //the videopicture on the dialogbox
// Here I try to display the imagestream
WebCam.Create(0,rect,&m_Disp,TRUE); //I think in this line something
WebCam.ConnectWithDriver(-1); //wrong.
WebCam.SetPreviewRate(15);
WebCam.StartPreview(TRUE);
}
void CCamSampDlg::OnCancel()
{
WebCam.Disconnect();
OnOK();
CDialog::OnCancel();
}
I've read the MSDN how to do that, but I guess I use the Creat-method wrong.
Please can somebody help me, you'll maken me so happy, really if I was a gay I would give a very big wet french kiss.
Thank you dear friends!!!!
If my application works, I forget all my problems.
|
|
|
|
|
Ok, that's nice but we cannot help you if don't explain us what is this WebCam member !
SimCom wrote:
really if I was a gay I would give a very big wet french kiss
Errr, no a 'thank you' is enough for me
|
|
|
|