Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

error C2064: term does not evaluate to a function

Posted on 1999-08-14
2
Medium Priority
?
241 Views
Last Modified: 2010-04-16
I am loading the netapi32.dll and calling the function NetScheduleJobEnum(). It returns a pointer to an array of AT_ENUM data structures.  For some reason, when I try to access the array it gives me "error C2064: term does not evaluate to a function"..Any clues? here is my code.  I am using MFC and have undefined #define VC_EXTRALEAN in stdafx.h like msdn says to..

typedef NET_API_STATUS (WINAPI *PFNNSJD1) (LPCWSTR,LPBYTE *,DWORD,LPDWORD,LPDWORD,LPDWORD);
            
PFNNSJD1 pfnNetScheduleJobEnum;
NET_API_STATUS returnValue;
AT_ENUM *lpBuffer = new AT_ENUM[20];
LPDWORD lpdwEntriesRead, lpdwTotalEntries;
pfnNetScheduleJobEnum = (PFNNSJD1)GetProcAddress(hNetAPI32, "NetScheduleJobEnum");

returnValue = pfnNetScheduleJobEnum(NULL, (LPBYTE*)&lpBuffer, MAX_PREFERRED_LENGTH, lpdwEntriesRead, lpdwTotalEntries, NULL);

if (lpBuffer[0].JobId() == 0)
  MessageBox(NULL, "horray", "test", MB_OK);


Please help!            
0
Comment
Question by:dorkSHOE
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 800 total points
ID: 1202407
Change

if (lpBuffer[0].JobId() == 0)
  MessageBox(NULL, "horray", "test", MB_OK);

to read

if (lpBuffer[0].JobId == 0)
  MessageBox(NULL, "horray", "test", MB_OK);

And it should work...

Feel free to ask if you encounter problems!
0
 

Author Comment

by:dorkSHOE
ID: 1202408
Great! Thanks a lot!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question