hello all
i am new to this forum, i have some knowledge in c++. I am developing a win32 dll using vc++ 6.0 in winxp sp2 using a third party SDK my problem is
the sdk is having a few structures
1) -
typedef struct SKYETEK_ID
-
{
-
unsigned char *id;
-
unsigned int length;
-
} SKYETEK_ID, *LPSKYETEK_ID;
2) - typedef struct SKYETEK_TAG
-
{
-
SKYETEK_TAGTYPE type;
-
LPSKYETEK_ID id;
-
unsigned short afi;
-
unsigned short session;
-
unsigned char rf;
-
TCHAR friendly[128];
-
void *user;
-
void *internal;
-
} SKYETEK_TAG, *LPSKYETEK_TAG;
3) - unsigned char SelectLoopCallBack(LPSKYETEK_TAG lpTag, void *user)
-
{
-
char* tid;
-
unsigned char *ttype;
-
if( !isStop )
-
{
-
if (lpTag!=NULL)
-
{
-
-
tid=(SkyeTek_GetTagTypeNameFromType(lpTag->type));
-
ttype=lpTag->id;
-
MessageBox(0,ttype,"test",0);
-
-
USES_CONVERSION;
-
MyTagid =A2BSTR(tid);
-
MyTagType=A2BSTR(ttype);
-
SkyeTek_FreeTag(lpTag);
-
-
}
-
}
-
-
return isStop;
-
}
in the third function i am calling the second structure as lpTag.
i want the tag id which is pointing to another structure with unsigned char* as data type.
so i created a local unsigned char* variable and try to store the lptag->id value into it. what returns is some thing gibberish.how get the correct value from the structure and store it in a char * any help will be greatly appreciated.tha nks and regards
2 1723
I guess you didnt allocate memory for your "unsingned char * id"
how to do that ? (a bit naive)
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: kar1107 |
last post by:
Hi all,
Can the compiler chose the type of an enum to be signed or unsigned
int? I thought it must be int; looks like it changes based on the
assigned values. Below if I don't initialize FOO_STORE to be, say -10,
I get a warning about unsigned comparison and I'm seeing an infinite
loop.
If I do initialize FOO_STORE = -10, I don't see any warnings. No
infinite loop.
|
by: Stephen Cawood |
last post by:
I'm trying to use a C++ .lib from C# (I tried the Interop group will no
results).
I have a working wrapper DLL (I can get back simple things like int), but
I'm having issues dealing with an array of bytes.
For example, the .lib contains this function:
int create(int id, int scale, unsigned char *image);
In the wrapper DLL I have this function:
|
by: Yevgen Muntyan |
last post by:
Hey,
Why is it legal to do
union U {unsigned char u; int a;};
union U u;
u.a = 1;
u.u;
I tried to find it in the standard, but I only found that
|
by: Michael B Allen |
last post by:
Hello,
Early on I decided that all text (what most people call "strings" )
in my code would be unsigned char *. The reasoning is that the elements
of these arrays are decidedly not signed. In fact, they may not even
represent complete characters. At this point I think of text as simple
binary blobs. What charset, character encoding and termination they use
should not be exposed in the interface used to operate on them.
But now I have...
|
by: Kenzogio |
last post by:
Hi,
I have a struct "allmsg" and him member :
unsigned char card_number; //16
allmsg.card_number
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |