Try this int b; int afunction() { int *ptr= &b; int b = 0; ..... }
haritadala
Posts
-
Global Scope in C -
IO Completion portsHello all Can any one please tell me when to use IO Completion ports with sockets? When we want to handle asynchronous read or write operations we can do with event objects then why to use IO Completions ports? Please advice .. Thanks for your help. Amarelia Maehsh Gujarat India
-
Difference between thread and fiber on windowsHello all Can any one please explain me the difference between thread and a fiber? In what circumstances we should go for a fiber? Please give me some sample code or point to URL where I can get the same. Thanks for your help. Hari.
-
Creating simple text editor using CView as baseHello Clevedon_Peanut Thanks you very much for the reply. I'll try for samples in codeproject and codeguru. Thanks Hari.
-
Creating simple text editor using CView as baseHello all I'm new to doc/view architechture. I want to create a simple text editor which have to enable me to enter text, open files, edit,cut and copy. I'm using MFC AppWizard and accepting the defaults. It's creating a basic skeleton and when I ran it it show's up a simple editor, but when I open a file it's not showing the contents. Similarly its not allowing me to enter anything. When creating the application if I change the base class of myview to CEditView then I'm able to do all the above operations. But I want to implement all the functionality just by deriving from CView. Can anyone help me in this regard? Any example code or article which explains how to do will be of great help. Thank you very much for your help. Hari.
-
how to detect bluetooth ports on different windows platforms?Hello all How do one can detect whether a particular port is a serial port or virtual com port created for bluetooth? In the case of win2000 and winXP under HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM ports are listed as /device/serial0 // serial port /device/Btport1 // bluetooth virtual com port So in the case of win2000 and winXP, I've no problem in distinguishing a serial port from virtual bluetooth port. But in the case of win98 and winMe all the ports are listed as COM1 COM2 .. and so on. so how do I make an application to recognize bluetooth ports on all the windows platforms? If anyone know how to do it please help me. many thanks for your help. Hari.
-
fatal crash on win98 & winMe, Need help.Hello all Thanks for the replies. I'm not using .Net/2003. I'm getting blue screen before any exceptions are trapped. I'm getting the following error fatal error 0E at 0028:C0003E8C I looked at microsoft knowledge base for these error but couldn't find the solution :( Any ideas? Thanks for the help. Hari.
-
fatal crash on win98 & winMe, Need help.Hello David Thanks for the reply. I'm not using or assuming something that's not on NT machines. My application is taking to devices connected to usb port. I'm using the driver supplied by third party vendor(this driver works on all windows machines, according to vendor). I'm able to send/receive data even on win98/winMe. But when I try to disconnect I'm experiencing fatal crash. Any ideas as on how to debug this problem will be very much appreciated. Many thanks for your help. Hari.
-
fatal crash on win98 & winMe, Need help.Hello all I've an application which is working well on win2000 & winXP. But when I ran the same application in win98 & winMe, it's leading to fatal crash and giving me blue screen. In the case of fatal crash, how can we detect to which part of the application is causing it? I'm not able to debug this problem on win98 and winMe. If anyone know abt any tools or techniques which can help me in debugging the problem, pls help me. Many thanks for your help. Hari.
-
windows systray balloon tooltip, need helpHello all I'm programming windows systray and want to put an icon in the sytray which can popup balloon tooltips. I'm using win2000 with visual studio6. The problem is the header file "shellapi.h" which I've seems like it doesn't support balloon tooltips. Here's the NOTIFYICONDATA structure I find in the hearder file typedef struct _NOTIFYICONDATAA { DWORD cbSize; HWND hWnd; UINT uID; UINT uFlags; UINT uCallbackMessage; HICON hIcon; CHAR szTip[64]; } NOTIFYICONDATAA, *PNOTIFYICONDATAA; This structure doesn't have the members like "szInfo" which has to be used to popup balloon tooltip. I refer to microsoft docs where it says version>5 is needed, when I check my shell32.dll version it shows as >5. Do I need to have new header file? If yes, where can I download from? Can any one help me? Many thanks for your help Hari.
-
Refreshing windows systrayHi Simon Thank you very much for reply.
-
Finding version info of a DLLThank you very much for the replies.
-
Finding version info of a DLLHello all Is there any function to findout the version information of a DLL programatically. Pls help.. Thanks Hari.
-
Refreshing windows systrayHello all I'm programmatically adding and removing icons to windows systray. Icons showup correctly when I'm adding it programmatically but when I remove it programmitically the icon still shows up until I put the mouse pointer there. Is there any way to refresh the system tray so that the icons showup properly. many thanks for your help. Hari.
-
How to change background color of CDialog and it's elementsHello all How do one should go about changing the background color of CDialog and its elements like buttons,group boxes etc. Pls help me with an example. Many thanks for your help. Hari.
-
Retrieving proxy info from IE settingsThanks for the reply. I found similar settings in HKEY_USERS. Hari.
-
Retrieving proxy info from IE settingsHello all I want to program an application which has to retrieve info reg whether the browser is using the proxyserver or not. I found this information in registry under HKEY_USERS\S-1-5-21-1614895754-1647877149-839522115-500\Software\Microsoft\Windows\CurrentVersion\Internet Settings But I would like to know whether this works on all windows machines or not. If there's any better way of retreiving this information, pls suggest. Thanks for your help. Hari.
-
Recompiling only modified files in vc++ environmentHello all I've a project which contains a list of .cpp files. I'm using vc++ 6.0. When ever I tried to build the .exe after modifying a single file, vc++ environment is recompiling all the files in my project and building the exe. How do I compile only modified file and link it to build the new .exe ? Thanks Hari.
-
CreateFile() failing when trying to open HID deviceHello all I'm trying to program HID device. After fetching device name using SetupDiGetDeviceInterfaceDetail(), I'm trying to open it using the following. CreateFile(DevicePath,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,NULL, NULL); but I'm getting ERROR_ACCESS_DENIED. I'm using windows 2000. Can anyone help me in this? Thanks for your help Hari.
-
Error: Exception BreakpointHello all I'm getting this error in my code and my stack trace is the following . _NMSG_WRITE(10) line 221 abort() line 44 + 7 bytes AILERONPUSH! terminate(void) + 111 bytes AILERONPUSH! _CxxUnhandledExceptionFilter(struct _EXCEPTION_POINTERS *) + 46 bytes KERNEL32! 77eab45f() KERNEL32! 77e8b2eb() it's saying that "user breakpoint reached at xxxxx". I'm having an application in which I've one parent thread and 5 child threads. parent thread read records from database and assign them one by one to child threads for processing. I'm maintaining a queue which contains handles to child threads. Queue will be empty when all the threads are assigned a record and at this point parent thread will wait. once each thread finishes it's job it will put it's handle in queue so that parent can assign him the next record. I'm experiencing the above error only if the no. of records to be processed are more than no. of threads( In this case threads will be used repetitively by parent thread depending upon their availablility in queue). Can any one help me resolve this error? It'll be of great help if anyone can give me insight into situation's that cause the above error. Thanks for your help Hari.