Hello Everybody,
i am new in programming at all.
i am trying all the day to figure out how to get with simple structure and access and change the values in it with vb6.
I have found at least this :
// dllhdr.h: The interface of the DLL.
#ifndef GUARD_DLLHDR_H
#define GUARD_DLLHDR_H
#if defined(BUILD_MY_DLL)
#define DLLSYM __declspec(dllexport)
#else
#define DLLSYM __declspec(dllimport)
#endif
#if defined(__cplusplus)
extern "C" {
#endif
struct MyData
{
/* Put data here. */
};
DLLSYM extern MyData myData;
#if defined(__cplusplus)
}
#endif
#endif /*guard*/
--------------------------------------
// dllimp.cpp: DLL implementation file
#define BUILD_MY_DLL
#include "dllhdr.h"
MyData myData;
------------------------------------
i have created the dll above
then i have only changed the structure to this
struct MyData
{
unsigned int z1 :1
unsigned int z2 :1
unsigned int z3 :1
}
now from my vb6 programm i need to change the values in those variables z1, z2 and z3 to the values 0 or 1 in simpliest way
i have tried this
Declare Function MyData Lib "c:\firstdll\dllimp.dll" -no errors
now when i try to dim Mybits(20) as MyData ----it says user typ not defined
can someone please help?
sorry if my english is bad :)
i am new in programming at all.
i am trying all the day to figure out how to get with simple structure and access and change the values in it with vb6.
I have found at least this :
// dllhdr.h: The interface of the DLL.
#ifndef GUARD_DLLHDR_H
#define GUARD_DLLHDR_H
#if defined(BUILD_MY_DLL)
#define DLLSYM __declspec(dllexport)
#else
#define DLLSYM __declspec(dllimport)
#endif
#if defined(__cplusplus)
extern "C" {
#endif
struct MyData
{
/* Put data here. */
};
DLLSYM extern MyData myData;
#if defined(__cplusplus)
}
#endif
#endif /*guard*/
--------------------------------------
// dllimp.cpp: DLL implementation file
#define BUILD_MY_DLL
#include "dllhdr.h"
MyData myData;
------------------------------------
i have created the dll above
then i have only changed the structure to this
struct MyData
{
unsigned int z1 :1
unsigned int z2 :1
unsigned int z3 :1
}
now from my vb6 programm i need to change the values in those variables z1, z2 and z3 to the values 0 or 1 in simpliest way
i have tried this
Declare Function MyData Lib "c:\firstdll\dllimp.dll" -no errors
now when i try to dim Mybits(20) as MyData ----it says user typ not defined
can someone please help?
sorry if my english is bad :)