all groups > visual c > september 2003 > threads for september 15 - 21, 2003
Filter by week: 1 2 3 4 5
Beep function
Posted by Ahmed Fat-hi at 9/21/2003 12:37:07 PM
I need function that generates simple tone with frequency
1562.5 HZ to be played on the audio
device for duration 1920 microseconds.
i can not use the Beep function since it has the following
declaration
BOOL Beep(
DWORD dwFreq, // sound frequency in HZ
DWORD dwDuration //... more >>
Removing Form1 Traces
Posted by Bob Palank at 9/19/2003 11:45:13 PM
My objective was to remove all traces of Form1 from my source which was a
vcpp.Net Windows application. And I was successful - but in doing so, I
lost the ability to graphically modify my form!
Could it be true that you must have the original Form1 to work with the GUI
ToolBox ?
I doubt it but... more >>
DllImportAttribute CallingConvention
Posted by Mr.Tickle at 9/19/2003 5:40:23 PM
I am calling an unmanaged DLL like follows in a Class wrapper.
namespace blah
{
[DllImport("DLLName.DLL", EntryPoint="BlahEntryPoint",
CallingConvention=CallingConvention.ThisCall]
public static extern void blahFn(out long blah, out long blah2);
class sealed ClassBlah
{
privat... more >>
ifstream::tellg() error
Posted by Chris at 9/19/2003 5:20:28 PM
I am reading in image files in a program and I read in
the header in ascii mode and the data in binary mode.
The problem is, sometimes tellg() gives me a completely
incorrect result and sometimes it is just fine. It is
quite annoying because there is no other good way to read
these file ... more >>
auto_ptr in managed code
Posted by Bill Burris at 9/19/2003 5:15:55 PM
How do I use auto_ptr in managed C++?
Here is my existing code:
namespace Alta
{
public __gc class CMDAQ
{
public:
CMDAQ();
~CMDAQ();
private:
CDAQControl* itsDAQControl;
};
}
namespace Alta
{
CMDAQ::CMDAQ( )
{
itsDAQ... more >>
ini files
Posted by Duncan Winn at 9/19/2003 1:53:48 PM
What is the best way of accessing info from ini files from VC++ (in VS.NET).
... more >>
loop
Posted by denis at 9/19/2003 11:34:10 AM
I have I do while ((choice==1)||(choice==2)||(choice==3));
loop where I am sking a user to enter appropriate value
1,2,3. If user enters incorrect value I want then to see
the main menu.
How do I do this?
... more >>
Switch
Posted by denis at 9/19/2003 4:35:39 AM
What am I Doing incorect? My choice value is 2, but for
some reason cout is not printing the message?
switch (choice)
{
case 1:cout<<"Enter value in Fahrenheit:" ;break;
case 2:cout<<"Enter value in Centigrade:";break;
case 3:cout<<"Thank you for using this program.";break;
default: break;
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
About DLL
Posted by Varadha at 9/19/2003 4:18:44 AM
I am using a mutiple application sharing a dll. In my
application i am loading the dll using LoadLibrary Function.
My Question is:
1) I have loaded the dll in the 1st appication
2) Now if again if i try to load the same dll again in
another application whether i can know if the dll is loaded
... more >>
Error calling _AppDomain->CreateInstanceFrom method
Posted by dwp at 9/19/2003 1:49:20 AM
hResult = pDefaultDomain->CreateInstanceFrom( pAppDomain-
>m_bstrLoadAssemblyName, pAppDomain->m_bstrManagedClass,
&pObjectHandle )
This call gives the E_ACCESSDENIED return value. I have
checked that nothing is using the loaded assembly and that
the access rigts are OK.
Does anyone kno... more >>
Problem Creating Window
Posted by Ady at 9/18/2003 5:42:23 PM
Hi,
When I create a window as follows
aWnd->hWnd = CreateWindowEx(WS_EX_CLIENTEDGE, strClassName, strWindowName,
dwStyle, 10, 10,
40,40,
hWndParent, NULL, aWnd->hInstance, NULL);
The window handle hWnd is null but when I call GetLastError the error code
is 0???????
Cany Someone Help?... more >>
/NOENTRY Link error in Managed c++ Web Service
Posted by Carl at 9/18/2003 3:29:03 PM
I have a managed c++ web service that uses ATL.
Everything worked fine with VC 7.0, but when I recompile
with VC 7.1 I get the following link warning:
LINK : warning LNK4243: DLL containing objects compiled with /clr is not
linked with /NOENTRY; image may not run correctly.
Having looked ... more >>
.NET migration
Posted by saurabh007 NO[at]SPAM yahoo.com at 9/18/2003 11:27:51 AM
I have the C++ exe created with Microsoft Visual Studio 6.0. Now have
ported the code to Microsoft Visual Studio 7.0. to compile with /clr
extension ON; as the exe uses some managed code components.
The project compiles fine in both Debug and Release version. It also
runs perfectly in both ve... more >>
Getting the correct filesize?
Posted by Ady at 9/18/2003 11:05:54 AM
Hi,
I am doing the following to read in a file however it does'nt seem to be
reading in the correct size its like a few hundred bytes short?
level = fopen("c:\\MALEV01.AIM","r");
fseek(level,0,SEEK_END);
level_size=ftell(level);
fseek(level,0,SEEK_SET);
levelBuffer = (char*)malloc(level_s... more >>
translation from C# to VC++ .NET
Posted by José Achig at 9/18/2003 10:00:08 AM
Hello
I want to change this code example wrote in C# to VC++ .NET, please give me
a translation
namespace MyNamespace
{
public class MyObject : MarshalByRefObject{
public override Object InitializeLifetimeService()
{
// This lease never expires.
... more >>
error result returned from 'cl.exe'
Posted by Arun at 9/18/2003 8:51:20 AM
Hi,
When I try to compile my VC++.Net project in the release mode, I'm getting
the error, "error result returned from 'cl.exe' ". It happens when I add a
static data member to a class whose all other members are static
This doesn't happen when I compile in the debug mode.
Anybody has come a... more >>
Transparent Brush
Posted by Marcus de Leon at 9/17/2003 3:56:43 PM
Hi,
Is there anyway to make a transparent brush with C++? For example I want to
make a brush that has a color of red with a 50% tranparency.
Thanks
Marcus de Leon
... more >>
makefile for vc7.0
Posted by chia_ccc NO[at]SPAM yahoo.com at 9/17/2003 11:50:54 AM
Hi List,
I have an existing 7.0 project which I need to create a makefile for.
I tried to do it this way:
file -> add new project -> makefile project.
It generates a testing.vproj for me, so, seriously, I don't know what
to do with it. Can someone provide me a step-by-step to create a
make... more >>
Installation problem
Posted by Microsoft at 9/17/2003 8:59:03 AM
Okay, here's the deal. I installed VIsual C++.net and Visual Basic.net, both
2002 versions, earlier this year. I had to delete my profile on the network
recently, and now I'm re-installing VC.
I can't get it to install! I keep getting an internal error on the second
disc (2349, I *think*). No ... more >>
Running C++ code in VC++.Net
Posted by Peter Krikelis at 9/17/2003 6:00:19 AM
Hi,
I have a C++ code. I tried to open and run in in VC++.Net
and it gave me an error: fatal error C1083: Cannot open
include file: 'getopt.h': No such file or directory
Somehow it did not find the standard C++ library. And the
question is what do I need to do in order to run the C++
c... more >>
distinguishing between VC2002 and VC2003
Posted by kwijibo NO[at]SPAM ananzi.co.za at 9/16/2003 11:38:50 PM
Hello,
is there a way to distinguish between VC.NET 2002 and VC.NET 2003 at
compile-time (pre-defined preprocessor macros)? I have only found
_MSC_VER to be set to 1300 in both versions, which doesn't solve this
problem. Do I have to define my own macro or redefine _MSC_VER?
regards,
And... more >>
#defines in C#
Posted by Mr.Tickle at 9/16/2003 5:56:37 PM
I have a .H file with tonnes of #define constants and I want to access that
from C# but I dont want to rewrite the header file as a class.
Is there a way after including that in MC++ to get those values from C#?
... more >>
Memory access violations and Managed C++
Posted by BillyO at 9/16/2003 5:28:41 PM
In the attached code fragment I have a buffer overflow and
a memory access violation. When I run the code .Net fails to
verify the IL because of the buffer overflow and I get an exception
as expected. My question relates to the memory access violation,
specfically, what should happen? My guess ... more >>
Get rid of "Build before Debug" MessageBox?
Posted by Axel Dahmen at 9/16/2003 3:02:46 PM
Hi,
when applying changes to the code and hitting [F5] to debug, a MessageBox
pops up asking me if I want to build before debugging. Of course I want,
that's why I've changed the code... Is there a simple way to suppress this
MessageBox in Studio 7 and to start a Build-Debug sequence immediate... more >>
anyone know a good book for learning DCOM?
Posted by Bruno van Dooren at 9/16/2003 2:24:42 PM
Hi,
currently we have an intern writing an OPC server for us in C++.
OPC is a hierarchy of classes based on DCOM.
When the intern leaves I will have to maintain that server.
since i am new to DCOM, I was wondering if anyone could
recommend a good book for learning DCOM: what it is, what it ... more >>
Dumb and Dumber
Posted by Phillip McClurg at 9/16/2003 10:57:49 AM
I just had VC++ installed by our administrator - when I
tried to debug a test application I discovered I did not
have access because I wasn't in the Debugger User Group.
Geez - I guess I'll call the administrator back up and
have him waste another thirty minutes because Microsoft is
busy ... more >>
unresolved external symbol ___security_cookie
Posted by Olivier Lechenne at 9/16/2003 10:56:04 AM
I am converting some projects from VS 6.0 to VS .NET 2003 and I get a linker
error
error LNK2001: unresolved external symbol ___security_cookie or
error LNK2001: unresolved external symbol ___security_cookie
Does anybody knows where does this symbol comes from? Is it because I am
using a wr... more >>
registering an oledb provider
Posted by Duncan Winn at 9/16/2003 9:32:25 AM
I have developed an Ole DB provider using Visual Studio.NET ATL and C++.
What is the best was to redistribute this. Are the any free installation
packages about, do I even require an installation package or is there an
easier way to register it.
Thanks,
Duncan.
... more >>
How to use ISAXXMLReader in ATL Server Web Service Project
Posted by FS Liu at 9/16/2003 4:50:31 AM
Hi,
In my current ATL server project, I have to parse the
input in the client application's request to find out
the different combination of parameters, instead of
using SOAP. For this reason, I am not using ATL server
web service project. On client side, I use POST to send
XML to web ser... more >>
scribble tutorial
Posted by bh at 9/16/2003 3:04:18 AM
i haven't the scroibble in my cd of visual c++
if someone can help me for find this in the net because i
hope to learn how can i use visual c++ for developping my
applications with interface
thanks
rym.benhaddada@noos.fr... more >>
Counting Points
Posted by Tr1n1x at 9/16/2003 12:08:37 AM
I'm trying to finish a program that gives a test for the
user. The test has four options to choose from,
1. addition
2. subtraction
3. multiplication
4. division.
Once the user picks one of the choices above the
program will give a specific amount of mathematical
problems u... more >>
Should project settings affect accuracy?
Posted by David Binner at 9/15/2003 10:19:42 PM
Hello.
I recently came across something that baffled me regarding
floating point calculations.
I use Microsoft Visual C++ version 6 on a Windows 2000
machine. All my variables are type double.
After compiling a program in Debug mode and then running
the program, it correctly calculate... more >>
Template instantiation problems
Posted by Lewis Baker at 9/15/2003 8:51:13 PM
I am having some template problems in VC7.1
The following code should compile fine but I get the error:
'warning C4667: 'void F(Traits<T>::P)' : no function
template defined that matches forced instantiation'
However if I instantiate the function implicitly by using
it in some... more >>
MAKEINTRESOURCE and managed extensions
Posted by Stu Smith at 9/15/2003 3:04:03 PM
In upsizing some old VC6 code, I've come across the following problem
regarding MAKEINTRESOURCE.
In the old version, there was code along the lines of:
m_pListBox.AddString(CString(MAKEINTRESOURCE(IDS_TESTSTRING)));
If you however turn on managed extensions, this code fails. (A workaro... more >>
Convert System::String to char*
Posted by Tim Mulholland at 9/15/2003 12:38:27 PM
How can i (using Managed C++) convert a System::String object containing
basic text into a char* object?
Thanks in advance,
Tim
... more >>
|