-
- segmentation fault due to the struct pointers
by I.You
- 3 Replies
- Last post
by Marius Bancila
- Hi there,
Please see this code:
typedef struct { char **item; char **user; }Listtype;
int main(int argc, char **argv) {
.... Listtype List;
...
strdiv(buf, &List);
..
}
void strdiv(char *buf, Listtype *List) { ... List->item[0] = strtok(buf, "<>"); <-- HERE
...
The segmentation fault occur
-
- How to judge the attribute of the folder
by Vingo
- 1 Replies
- Last post
by Pintu Shukla
- hi everyone
Now i met the question that I cannot get the attribute of the Folder
I seted the folder read-only and tried
if((GetFileAttributes (folderpath) & FILE_ATTRIBUTE_READONLY) != 0)
{
MessageBox("readonly");
}
else
{
MessageBox("else");
}
And every time I got the message "esle",
Is there any othe
-
- Linker Error, Please help
by DipankarVerma
- 4 Replies
- Last post
by DipankarVerma
- Hi all,
I have installed VS 2005 professional in my system and tried to make a simple MFC Dialog based program but it is giving liker error.
1>mfcs80ud.lib(stdafx.obj) : error LNK2001: unresolved external symbol "int __cdecl _AfxInitManaged(void)" ( _AfxInitManaged@@YAHXZ)
1>C:\Documents and Settings\billak\My Documents\Visual Studio 2005\Projects\TestMFC\Debug\TestM
-
- XML Extracting Attributes (Simple Question)
by calmal20
- 7 Replies
- Last post
by robben07160
- Hi,
I have a simple question regarding XML.
If I have an XML file in a similar format as seen below, want I want to do is find ¡®Product_Number = 1¡¯ get the COLOUR and PRICE but what would be the best way to do this (C++ .NET) and would code loook like
< xml version="1.0" encoding="utf-8" >
<PRODUCTS>
<PRODUCT>
&
-
- Populating globally defined tchar field
by MrsTickle
- 7 Replies
- Last post
by Holger Grund
- i am new to c++ so i think this is a silly question, but i'm a little confused.
i am populating a TCHAR string.
this works :
TCHAR StrData[] = _T( "TextInformation " );
i want to declare StrData globally, so have used
__declspec ( selectany ) TCHAR StrData[];
in a header file and include it where needed.
but how do i now populate the StrData field
-
- Toggling Fullscreen
by akhin
- 6 Replies
- Last post
by akhin
- How can i hide the toolbar on top of my dialog or window in and show it again
I am asking this to make a fullscreen toggling.
Thank you very much.
-
- hangman project
by m1sterb0b
- 10 Replies
- Last post
by Simple Samples
- Hello, I'm somewhat new to C++. I am taking a class on it in college, but the teacher doesnt like to explain things very well. Basically her idea of helping us learn C++ is this: "this is how you start all your programs in this class: #include <iostream> using namespace std; int main() { } " She never explainted even what "#include <iostream>" or "using namespa
-
- Constructors for global variables are not called???
by dannyge
- 12 Replies
- Last post
by dannyge
- I have a VC++ project B that is linked into a static library "B.lib". This library is linked into project A which creates A.exe. The constructors for the global varaiables in B do not get called. 1. If I have golbal variables in A then there is no problem - the constructors for those get called. 2. I f the solution (Project A and B) get linked on my coleagues computer then there is no pr
-
- ActiveX on Vista
by Ian Hutty
- 1 Replies
- Last post
by Damien Watkins - MSFT
- Hi
We have application which is launched by Activex and works fine on Windows XP - but we are having problems with this on Vista.
We have looked at many MSDN articles which suggest using manifest files. We have implemented manifest in resource section of correct .exe file using MSVS. We have also read some articles regarding the use of MT.exe tool (v5) from the Vista SDK to embedd the manif
-
- Output binary build from command line crashed
by Hila123
- 4 Replies
- Last post
by crescens2k
- Hi, I current working on an ant script that will call cl.exe and link.exe to compile and link my VC proj. The compiling and linking work "fine" and I'm able to get my binary (exe or dll according to projs). However when I try to run it i got the following error reported by Vista TaskDialog [code] Problem signature: Problem Event Name: BEX Application Name: MyProg.exe Application Version:
-
- In what order does CFileFind::FindFile visit the files?
by Mitterand
- 2 Replies
- Last post
by rtpninja
- BOOL bWorking = finder.FindFile("*.xml"); while (bWorking){ bWorking = finder.FindNextFile(); fileName = (LPCTSTR) finder.GetFileName(); } I used the above codes to visit eight files, AMAM004_1130607CRW_TEST.xml, AVIA007_1130607CRW_TEST.xml, DGLM002_1130607CRW_TEST.xml, FDOM003_2130607CRW_TEST.xml, IMIM001_3130607CRW_TEST.xml, RKaA008_2130607CRW_TEST.xml and SH_M005_21306
-
- menu handler... help me.
by Rakesh Simpi
- 4 Replies
- Last post
by rakesh
- hi all. i am developing a stand alone application in vc++ 2005 in which i am goin to have menu <with several menuitems> and toolbar and few shortcuts. as of now, i generate the menu by reading each menuitem and its sub items stored in an mdb file<i.e. access database> now can ne of you please suggest me a way to implement a <single>runtime event handler which acts according to th
-
- hello, a program with release and debug
by Tony2008
- 4 Replies
- Last post
by Ramkrishna Pawar
- when does an program run normally with release version but debug version
-
- CAnimateCtrl does not animate
by Albatross2006
- 1 Replies
- Last post
by Damien Watkins - MSFT
- Hello!
In my project on MFC I use the ADO library to get data from MSSQL.
I want some dialog window to be displayed during long operation, such as executing any store procedure that download image from MSSQL. I try it in the following way:
1) Creating the modelles dialog with animate control
2) Executing the store procedure
3) Destroying the modelles dialog
The fact is that C
-
- How to use dll created in vc,in vb
by Vish_All
- 2 Replies
- Last post
by Aleksandr Tokarev
- hi,
I have created a DLL in Visual c++, I need to call this in Visual basics.
I just tried to Use reference file, but there were no vc++ ref. files
-
- Shortcut Key for Dialog Button
by davidlks83
- 6 Replies
- Last post
by Nishant Sivakumar
- Hi all,
I am doing a shortcut key in MFC version 6. I create a accelerator in my resource view. Then i add few shortcut key i want. Then i use the PreTranslateMessage(MSG* pMsg) to do the task i want. Everything seem to be OK but when i assign 1 of my shortcut key to space bar (VK_SPACE) at the accelerator. The shortcut key work abnormal, it works only once then i need to click other things
-
- ATL-COM: Failed to return new Code Element...
by UrK
- 4 Replies
- Last post
by UrK
- I have a problem with VS2005 SP1 C++ project. When trying to add new method to IDL interface of ATL project the following error is shown Failed to return new Code Element. Possibly syntax error. New Element Name: abc This worked previously on this machine. I could add new methods using wizard on other machine with the same VS but on some stage it stopped working too. On one of the machines the m
-
- How to show all build commands in Visual Studio (C++) output window?
by runy
- 3 Replies
- Last post
by runy
- Hi. I am currently working on a project with about 60 build targets in a Visual Studio (.NET) solution. We've had a number of issues with developers changing build settings and/or adding targets without adhering to our build guidelines. To help ensure build consistency I would very much like to have *all* Visual C++ build commands shown in the build output (whether built within the IDE or from the
-
- Calling unmanaged C++ dll function with char** from C#
by elikhom
- 4 Replies
- Last post
by Marjoan
- Hi, I'm calling an unmanaged C++ dll from C#, everything was fine until I got stuck in one of the methods that goes like this... C++ part void populateFieldCategories(char** categories) I have tried using something like this in C# to get the array of strings but doesn't work... private static extern void populateFieldCategories([MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPArray
-
- call a C++ function from a C# dll
by dmircea
- 6 Replies
- Last post
by limpduck
- Hello, Sorry if this has been discussed, but I did not get any link. I have the following scenario: one C# dll and one exe file. I want to call from the dll one function in the exe file. Case 1) the exe file is a C++ CLI program. Case 2) the exe file is a normal C/C++ exe (non-managed exe) Which of these calls is possible A small sample or a link to a sample would be great. Thank you.
-
- New Problem: --- fatal error C1083
by Stephen Pickering
- 4 Replies
- Last post
by reenavade
- I'm presuming this is a very nooby question, but ive tried googling for the answer and cant find it. I dont know where to find it in the help section of the program either. So here I go. I Am following this tutorial
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk /
I am sorry if it is against the rules to post urls
and Ive done everything [im pretty sure] correctly but the on
-
- DLL priority
by Torakak
- 2 Replies
- Last post
by Torakak
-
I'm trying to write a DLL which requires a high priority, is there any way to do that (other than putting code in each DLL entry function to increase the thread's priority)
TIA
-
- How do Windows API file functions still have access to deleted files?
by N J
- 11 Replies
- Last post
by Andreas Masur
- I deleted some files (only data and text files, no dlls nor exes) from my application installed in the Program Files folder in Vista. I even removed the deleted files from recycle bin.
But all file functions in Windows API, (e.g. GetFileAttributes, fopen, fread) still have full access to the deleted files. These deleted files can still be read normally as if they were not deleted at all. Un
-
- Asynchronous Sockets in C++?
by yabansu
- 14 Replies
- Last post
by abcdefgqwerty2
- Hello,
I want to use asynchronous sockets in pure C++.
Is there anyone to tell me how to do it or at least show me a basic example
The external libraries are appreciated too.
Thanks...
-
- what is the best method for calculating change?
by jmac
- 6 Replies
- Last post
by jmac
- I have change stored in a double, and I want to switch it to int to determine dollars and cents, and then break it down to bills, quarters, dimes, nickles, pennies etc....
Im not exactly sure how to go about this, right now I havent even started because im totally lost... but this is my code so far
cout << "Please enter cash given: " ;
cin >> dcashtaken;