|
Well, languages that hide pointers, they are similar for me to having some car with engine capable to run 300kmph, but the car vendor decided for you , that it is dangerous and you cannot do it and forced some limitation to the car, that you can now drive max. 130kmph.
Yes, it is safe, and it will protect some people from being hurt, but it also hides some part of power inside the thing and you are not able to use it even on a racing polygon.
|
|
|
|
|
I need to get the Thread ID of another thread of the same application. The situation is like this, IEXPLORE.EXE loads my DLL (a thread) and it also has some other threads . I (my DLL) want to get the Thread ID of one of those threads (lets say an applet). Can I?
Thanx in advance,
Mahesh
|
|
|
|
|
One solution is GetThreadId().
Kuphryn
|
|
|
|
|
Thanx.
kuphryn wrote:
One solution is GetThreadId().
I have never seen such an API function....
Please get me more info pls...
Thanx.
Mahesh
|
|
|
|
|
I have written application which connects to MYSQL
database using recordset. I have written the code to
update a record from the table , which gives me error 'No
cursor name available'
Code is as follows.
CMyRecordSet set;
set.Open(CRecordSet::snapshot, "select * from
customer", 0);
set.m_CustNoParam = 1;
set.Edit();
set.m_CustNo = 2;
set.Update();
set.Requery();
I got the resolution for the problem in MSDN help as
follows.
--------------------------
The version 2.0 "ODBC Specification" requires that
implicit cursor names must remain until statement handles
have been dropped. The drivers provided with the ODBC
Driver pack, version 2.0, have been changed to conform to
the 2.0 specification. These drivers may be used with the
MFC library database classes without running into the
above problem.
----------------------------
I checked MYSQL driver version. It is 2.0 and still I am
getting the problem.
|
|
|
|
|
|
Is there is freeware on WIN 98 that display the content of memory in use by a program?
Thanks.
|
|
|
|
|
By a single program- not any that I know of.
But if you wanna display the amt of memory in use by the entire system ,there are lots of freeware programs like Rambooster.
Vikram.
-----------------------------
My site due for a massive update.
"Good lord you yanks are getting worse than a defensive VB developer at a C++ conference." - Paul Watson in the Lounge, 31 May 2003.
"Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design.
|
|
|
|
|
hi, all,
we have a project, a search engine to search pictures over internet.
before start, i have to know if it is possible.
main idea of the project is: the app doesn't "download" web pages (as normal engine does), instead, it sends a small app to each site to run the small app there to analyze if the site has pictures we need (i.e. pictures which have red color as main backgroud).
the reason to run the small app in each site is: downloading pictures is to slow (size of a picture is over 500K normally), sending a mall app is faster (size is 30K).
if no security protection, can i send a small app to each site to run it there silently (sites don't known about this)?
if yes, how to do that and any links or hints will be great.
thx
includeh10
|
|
|
|
|
Basically, you're asking if you can execute arbitrary code on a remote server without the permission of the admin.
The short answer is: No.
Long answer: Such a system could only work if it were voluntary (that is, the admin of the server decides to participate by downloading your app and running it) and you provided ports of the app for a number of different platforms. Many admins would want the source to check that it is indeed doing what you say it does (and nothing else). Also, the app would have to not use much CPU power (image analysis can be very CPU expensive). After all that, you'd have to ask yourself if it would really produce better results than GIS: http://images.google.com/[^]
- Mike
|
|
|
|
|
Dear all,
I am developing an application for Windows NT/2000/XP in which I want to create a folder whose size should not exceed 5MB. And should promt for error if data exceeds 5MB
Is there any way to fix the size of folder ?
At same time i want that folder should not be deleted.
Please comment!
Rohit
|
|
|
|
|
No. You cannot change the size of a folder without removing files.
Kuphryn
|
|
|
|
|
I donot want to change the size of folder, i just want to limit its size
|
|
|
|
|
I ran into a FAQ article written by Bjanrne Stroustrup, the
creator of C++. One question is about if void main() is a
legal statement and he replied this:
<quote>
The definition
void main() { /* ... */ }
is not and never has been C++, nor has it even been C. See the
ISO C++ standard 3.6.1[2] or the ISO C standard 5.1.2.2.1. A
conforming implementation accepts
int main() { /* ... */ }
and
int main(int argc, char* argv[]) { /* ... */ }
</quote>
This is link of his article:
http://www.research.att.com/~bs/bs_faq2.html#void-main
So what do you think? Do you do void main()? I think most
of the programmers do, and because this syntax is so popular
that eventually Java and C# has the statement like
public static void main(string[] args)
{
// blah blah blah
}
they say void main() !!
|
|
|
|
|
Most compilers will accept void main() , but that doesn't mean you should use it. In fact, on gcc 3.2.2, attempting to use void main() results in:
<br />
void.c: In function `main':<br />
void.c:2: warning: return type of `main' is not `int'<br />
VW_Red_Jetta wrote:
I think most
of the programmers do, and because this syntax is so popular that eventually Java and C# has the statement like ...
In Java, the reason main is void is because the standard way for dealing with errors is exceptions, not return codes.
Really, I just can't get worked up about the entry point of an app. However, if you're really into the theory behind the syntax and semantics of languages, I recommend writing your own script language interpreter. Writing a very simple language and interpreter is relatively easy and serves as a good introduction to abstraction and working with strings (and lets you get creative with the language).
- Mike
|
|
|
|
|
main() has always had a return type of int . The return value from main() is used as the exit code for the process.
Now, the reason for why some people write void main() is that historically, C programmers wrote:
main(int argc, char** argv)
{
} There are two things happening there. First, earlier versions of C let you omit the return type if it was int . Second, some compilers let you omit the return statement from main() and implicitly returned 0 or 1 or whatever their default was.
So later on, new C programmers who don't know those rules come along and assume that since there is no return type listed, that's the same as void .
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
|
hello,
i've a strange problem, i've written a program where i use a lot of keybd_event functions to simulate keyboard events, it seems like that this messes up the whole windows system. drag&drop is not working, and therefore starting programs with a doubleclick on the desktop is also not working.
this happens only on a few systems, i've searched for days but found no solution, can anybody help me?
bye
Mario
|
|
|
|
|
Are you also sending key up events? If you send
keybd_event ( VK_ESCAPE, 0, 0, 0 ); you'd better also send
keybd_event ( VK_ESCAPE, 0, KEYEVENTF_KEYUP, 0 ); or else the system will think the ESC key is still pressed.
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
I'm not at all sure whether this is the correct forum for this question but here goes:
I'm trying to investigate an existing signal processing algorithm that has been written in C. I do have the source code so I'm NOT reverse engineering! Instead I want to assess its "performance" using some "time series" data that I have generated in MATLAB.
The problem is that MATLABs data storage format (MAT files) does not allow you to extract records (i.e. data at specific timeshots in the time series)- instead you have to store an MxArray variable representing the whole time span of the data. This is inefficient in terms of memory space required - what if I wanted a huge timespan of data points?!
So I've looked at the possible use of CDF - Common Data Format - created by NASA for storing multidimensional data together with descriptive metadata. It is freely available on the Web (nssdc.gsfc.nasa.gov/cdf/html/FAQ.html) and comes with a C API. NOW ... MATLAB has functions "cdfread", and "cdfwrite" so ought to be able to create CDF files and read them back BUT ... the cdfwrite does not work when you try to append a new record to the CDF file. I've sent example files to MathWorks an they concede that the cdfwrite function doesn't work to spec!
Has anyone out there had a similar need to store time series data from MATLAB to a file which can later be accessed from C, one timeshot at a time? How did you do it and was it an efficient process? I'd be very grateful to anyone who can help me.
|
|
|
|
|
hello
can i store in valarray a vectors?
|
|
|
|
|
Is it OK to mix code that uses CString from MFC and CString from ATL?
I've got a library that doesn't use MFC, but does use CString from ATL.
I've got an EXE that uses CString from MFC.
I am running into unusual linker problems, and am not sure the cause. But one suspicion is that it might have something to do with the ?different? CString's....
Any thoughts on this?
Thanks in advance.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
Santa Cruz Networks
|
|
|
|
|
I recommend BSTR whenever you work with ATL. ATL offers a helpful BSTR wrapper class, CComBSTR.
Kuphryn
|
|
|
|
|
Uhhh -- Why? Does BSTR do UNICODE? What does BSTR offer that CString does not? And, back to the actual question, do the MFC and ATL CStrings work together?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
Santa Cruz Networks
|
|
|
|
|
Yes, BSTR supports Unicode. BSTR is COM compliant and thus is a VARIANT compliant data type. Other programming languages such as VB, Java, etc. understand BSTR.
Kuphryn
|
|
|
|