|
-
June 29th, 2009, 03:33 PM
#1
komunikations USMCDLL.dll
Programme was programmed for Console Aplications where functions.
I him remodelling to the Forms Aplications. But occurred me error plus I don't know how next.
Thank for counsel.
Code:
// Motory.cpp : main project file.
#pragma warning(disable : 4996) // Disable warnings about some functions in VS 2005
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <stdio.h>
#include <tchar.h>
#include <conio.h>
#include <process.h>
#include "USMCDLL.h"
#include "stdafx.h"
#include "Form1.h"
[STAThreadAttribute]
USMC_Devices DVS;
DWORD Dev;
using namespace System;
using namespace Motory;
Error:
.\Motory.cpp(14) : error C2337: 'STAThreadAttribute' : attribute not found
.\Motory.cpp(16) : error C2146: syntax error : missing ';' before identifier 'DVS'
.\Motory.cpp(16) : error C2470: 'USMC_Devices' : looks like a function definition, but there is no parameter list; skipping apparent body
.\Motory.cpp(16) : fatal error C1004: unexpected end-of-file found
-
June 29th, 2009, 05:24 PM
#2
Re: komunikations USMCDLL.dll
Move all the #includes before #include "stdafx.h" to after it i.e.
Code:
#include "stdafx.h"
#include <stdio.h>
#include <tchar.h>
#include <conio.h>
#include <process.h>
#include "USMCDLL.h"
#include "Form1.h"
using namespace System;
using namespace Motory;
// it's possible that USMC_Devices is part of the Motory namespace, so move it to after the using namespace
USMC_Devices DVS;
DWORD Dev;
Also remove the [STAThreadAttribute].
I'm of course guessing here, but try the above :
Darwen.
-
July 1st, 2009, 11:24 AM
#3
Re: komunikations USMCDLL.dll
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|