I'm trying to print TCP address but I'm getting "Dereferencing pointer to incomplete type" error. I think iphdr typecasting is not working. How do I fix this issue?
unsigned int hook_func(unsigned int hooknum,
struct sk_buff *skb,
const struct net_device *in,
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
struct iphdr *ip_header; // ip header struct
if (!skb)
return NF_ACCEPT;
ip_header = (struct iphdr *)skb_network_header(skb); /* I think this is not working */
printk("addr : %lu.\n",ip_header->saddr);
return NF_ACCEPT;
}
int init_module()
{
printk(KERN_INFO "initialize kernel module\n");
/* Fill in our hook structure */
nfho.hook = hook_func; /* Handler function */
nfho.hooknum = NF_INET_PRE_ROUTING; /* First hook for IPv4 */
nfho.pf = PF_INET;
nfho.priority = NF_IP_PRI_FIRST; /* Make our function first */
nf_register_hook(&nfho);
return 0;
}
For dereferece pointer of type struct iphdr you need
#include <linux/ip.h>
(Actually, this type is defined in include/uapi/linux/ip.h, but usually headers under uapi/ are included via other ones.)
I want to add customized atag variable in U-Boot and Linux kernel.
How can i achieve this?
Is there any procedure to add an ATAG variable in U-Boot and Linux?
The latest Linux kernel is attempting to obsolete ATAGS with device trees. However, the setup.h file defines the different ATAG values and structures. To parse these, you need to add them with something like,
static int __init parse_tag_custom(const struct tag *tag)
{
if (tag->hdr.size > CUSTOM_SIZE) {
/* Use, storing or acting on passed values */
tag->u.custom;
}
return 0;
}
__tagtable(ATAG_CUSTOM, parse_tag_custom);
as found in atags_parse.c. Of course, you need to add these to the values in setup.h.
u-boot is probably less defined as for the most part, it passes arguments via the kernel command line as this is not ARM specific. A command argument or device trees is probably the preferred method. If you gave an example of what type of configuration you need, someone could probably give better guidance.
U-Boot changes required :
A. Make sure the CONFIG_CMDLINE_TAG/CONFIG_SETUP_MEMORY_TAGS/CONFIG_INITRD_TAG are defined in you project definition header file ( u-boot/include/configs/am335x_evm.h ), and we can add our own tag here, eg. CONFIG_CUSTOM_TAG.
B. Add the structure definition you wanna append w/ ATAG in u-boot/include/asm-arm/setup.h, eg.
#define ATAG_CUSTOM 0x5441000a
struct tag_custom{
unsigned char mac_addr[6];
};
C. Add the struct at the tail of "u"...
struct tag {
struct tag_header hdr;
union {
struct tag_core core;
struct tag_mem32 mem;
struct tag_videotext videotext;
struct tag_ramdisk ramdisk;
struct tag_initrd initrd;
struct tag_serialnr serialnr;
struct tag_revision revision;
struct tag_videolfb videolfb;
struct tag_cmdline cmdline;
/*
* Acorn specific
*/
struct tag_acorn acorn;
/*
* DC21285 specific
*/
struct tag_memclk memclk;
/****** INFOTECH Custom TAG ********/
struct tag_custom custom;
} u;
};
D. Add implementation code in lib_arm/bootm.c:
static void setup_custom_tag(bd_t *bd);
static void setup_custom_tag(bd_t *bd) {
params->hdr.tag = ATAG_CUSTOM;
params->hdr.size = tag_size (tag_macaddr);
params->u.custom.cmd =0;
params = tag_next (params);
}
E. Add "#ifdef CONFIG_CUSTOM_TAG / #endif" at every place you change the code.
F. Done of U-Boot modification.
Linux Changes required:
A. Add parse tag code in linux/arch/arm/kernel/setup.c:
int cmd;
static int __init parse_tag_custom(const struct tag *tag){
printk("u.custom.cmd=%d\n",tag->u.custom.cmd);
return 0;
}
__tagtable(ATAG_MACADDR, parse_tag_custom);
B. Add the structure declaration as U-Boot did in linux/include/asm-arm/setup.h:
#define ATAG_MACADDR 0x5441000a
struct tag_custom {
int cmd;
};
C. Add the struct at the tail of "u"...
struct tag {
struct tag_header hdr;
union {
struct tag_core core;
struct tag_mem32 mem;
struct tag_videotext videotext;
struct tag_ramdisk ramdisk;
struct tag_initrd initrd;
struct tag_serialnr serialnr;
struct tag_revision revision;
struct tag_videolfb videolfb;
struct tag_cmdline cmdline;
/*
* Acorn specific
*/
struct tag_acorn acorn;
/*
* DC21285 specific
*/
struct tag_memclk memclk;
/* Add Infotech custom tag */
struct tag_custom custom;
} u;
};
D. Done w/ Kernel parts.
Follow this procedure ,
To achieve this goal, there're 2 parts need to be modified. One is the U-Boot, and the other one is the Linux kernel.
1. U-Boot changes required :
A. Make sure the CONFIG_CMDLINE_TAG/CONFIG_SETUP_MEMORY_TAGS/CONFIG_INITRD_TAG are defined in you project definition header file ( u-boot/include/configs/am335x_evm.h ), and we can add our own tag here, eg. CONFIG_CUSTOM_TAG.
B. Add the structure definition you wanna append w/ ATAG in u-boot/include/asm-arm/setup.h, eg.
#define ATAG_CUSTOM 0x5441000a
struct tag_custom{
unsigned char mac_addr[6];
};
C. Add the struct at the tail of "u"...
struct tag {
struct tag_header hdr;
union {
struct tag_core core;
struct tag_mem32 mem;
struct tag_videotext videotext;
struct tag_ramdisk ramdisk;
struct tag_initrd initrd;
struct tag_serialnr serialnr;
struct tag_revision revision;
struct tag_videolfb videolfb;
struct tag_cmdline cmdline;
/*
* Acorn specific
*/
struct tag_acorn acorn;
/*
* DC21285 specific
*/
struct tag_memclk memclk;
/****** INFOTECH Custom TAG ********/
struct tag_custom custom;
} u;
};
D. Add implementation code in lib_arm/bootm.c:
static void setup_custom_tag(bd_t *bd);
static void setup_custom_tag(bd_t *bd) {
params->hdr.tag = ATAG_CUSTOM;
params->hdr.size = tag_size (tag_macaddr);
params->u.custom.cmd =0;
params = tag_next (params);
}
E. Add "#ifdef CONFIG_CUSTOM_TAG / #endif" at every place you change the code.
F. Done of U-Boot modification.
2. Linux Changes required:
A. Add parse tag code in linux/arch/arm/kernel/setup.c:
int cmd;
static int __init parse_tag_custom(const struct tag *tag){
printk("u.custom.cmd=%d\n",tag->u.custom.cmd);
return 0;
}
__tagtable(ATAG_MACADDR, parse_tag_custom);
B. Add the structure declaration as U-Boot did in linux/include/asm-arm/setup.h:
#define ATAG_MACADDR 0x5441000a
struct tag_custom {
int cmd;
};
C. Add the struct at the tail of "u"...
struct tag {
struct tag_header hdr;
union {
struct tag_core core;
struct tag_mem32 mem;
struct tag_videotext videotext;
struct tag_ramdisk ramdisk;
struct tag_initrd initrd;
struct tag_serialnr serialnr;
struct tag_revision revision;
struct tag_videolfb videolfb;
struct tag_cmdline cmdline;
/*
* Acorn specific
*/
struct tag_acorn acorn;
/*
* DC21285 specific
*/
struct tag_memclk memclk;
/* Add Infotech custom tag */
struct tag_custom custom;
} u;
};
D. Done w/ Kernel parts.
/*
* Note: this file originally auto-generated by mib2c using
* $
*/
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include "pool.h"
/** Initializes the pool module */
void
init_pool(void)
{
/* here we initialize all the tables we're planning on supporting */
initialize_table_poolTable();
}
//Determine the first/last column names
/** Initialize the poolTable table by defining its contents and how it's structured */
void
initialize_table_poolTable(void)
{
const oid poolTable_oid[] = {1,3,6,1,4,1,21068,4,2};
const size_t poolTable_oid_len = OID_LENGTH(poolTable_oid);
netsnmp_handler_registration *reg;
netsnmp_iterator_info *iinfo;
netsnmp_table_registration_info *table_info;
DEBUGMSGTL(("pool:init", "initializing table poolTable\n"));
reg = netsnmp_create_handler_registration(
"poolTable", poolTable_handler,
poolTable_oid, poolTable_oid_len,
HANDLER_CAN_RONLY
);
table_info = SNMP_MALLOC_TYPEDEF( netsnmp_table_registration_info );
netsnmp_table_helper_add_indexes(table_info,
ASN_INTEGER, /* index: ifIndex */
0);
table_info->min_column = 1;
table_info->max_column = COLUMN_POOLINOCTETS;
iinfo = SNMP_MALLOC_TYPEDEF( netsnmp_iterator_info );
iinfo->get_first_data_point = poolTable_get_first_data_point;
iinfo->get_next_data_point = poolTable_get_next_data_point;
iinfo->table_reginfo = table_info;
netsnmp_register_table_iterator( reg, iinfo );
/* Initialise the contents of the table here */
}
/* Typical data structure for a row entry */
struct poolTable_entry {
/* Index values */
long ifIndex;
/* Column values */
u_long poolInOctets;
/* Illustrate using a simple linked list */
int valid;
struct poolTable_entry *next;
};
struct poolTable_entry *poolTable_head;
/* create a new row in the (unsorted) table */
struct poolTable_entry *
poolTable_createEntry(
long ifIndex
) {
struct poolTable_entry *entry;
entry = SNMP_MALLOC_TYPEDEF(struct poolTable_entry);
if (!entry)
return NULL;
entry->ifIndex = ifIndex;
entry->next = poolTable_head;
poolTable_head = entry;
return entry;
}
/* remove a row from the table */
void
poolTable_removeEntry( struct poolTable_entry *entry ) {
struct poolTable_entry *ptr, *prev;
if (!entry)
return; /* Nothing to remove */
for ( ptr = poolTable_head, prev = NULL;
ptr != NULL;
prev = ptr, ptr = ptr->next ) {
if ( ptr == entry )
break;
}
if ( !ptr )
return; /* Can't find it */
if ( prev == NULL )
poolTable_head = ptr->next;
else
prev->next = ptr->next;
SNMP_FREE( entry ); /* XXX - release any other internal resources */
}
/* Example iterator hook routines - using 'get_next' to do most of the work */
netsnmp_variable_list *
poolTable_get_first_data_point(void **my_loop_context,
void **my_data_context,
netsnmp_variable_list *put_index_data,
netsnmp_iterator_info *mydata)
{
*my_loop_context = poolTable_head;
return poolTable_get_next_data_point(my_loop_context, my_data_context,
put_index_data, mydata );
}
netsnmp_variable_list *
poolTable_get_next_data_point(void **my_loop_context,
void **my_data_context,
netsnmp_variable_list *put_index_data,
netsnmp_iterator_info *mydata)
{
struct poolTable_entry *entry = (struct poolTable_entry *)*my_loop_context;
netsnmp_variable_list *idx = put_index_data;
if ( entry ) {
snmp_set_var_typed_integer( idx, ASN_INTEGER, entry->ifIndex );
idx = idx->next_variable;
*my_data_context = (void *)entry;
*my_loop_context = (void *)entry->next;
return put_index_data;
} else {
return NULL;
}
}
/** handles requests for the poolTable table */
int
poolTable_handler(
netsnmp_mib_handler *handler,
netsnmp_handler_registration *reginfo,
netsnmp_agent_request_info *reqinfo,
netsnmp_request_info *requests) {
netsnmp_request_info *request;
netsnmp_table_request_info *table_info;
struct poolTable_entry *table_entry;
DEBUGMSGTL(("pool:handler", "Processing request (%d)\n", reqinfo->mode));
switch (reqinfo->mode) {
/*
* Read-support (also covers GetNext requests)
*/
case MODE_GET:
for (request=requests; request; request=request->next) {
table_entry = (struct poolTable_entry *)
netsnmp_extract_iterator_context(request);
table_info = netsnmp_extract_table_info( request);
switch (table_info->colnum) {
case COLUMN_POOLINOCTETS:
if ( !table_entry ) {
netsnmp_set_request_error(reqinfo, request,
SNMP_NOSUCHINSTANCE);
continue;
}
snmp_set_var_typed_integer( request->requestvb, ASN_COUNTER,
table_entry->poolInOctets);
break;
default:
netsnmp_set_request_error(reqinfo, request,
SNMP_NOSUCHOBJECT);
break;
}
}
break;
}
return SNMP_ERR_NOERROR;
}
above is my mib2c generated code. I am compiling it as subagent... but it is not showing any kind of values. What should be my next step to implement it ? from where can I get data? Please help me to implement it.
snmpwalk -c public -v 2c localhost 1.3.6.1.4.1.21068
POOL-MIB::elite = No Such Object available on this agent at this OID
Thansks in advance.
You need to add data to the poolTable_head linked list of data. You can do this like so:
struct poolTable_entry *entry = poolTable_createEntry(1);
entry->poolInOctets = 42;
And then put that code, which is just very basic example code with static numbers, somewhere that will get called. You could, for example, put it at the bottom of the initialize_table_poolTable() function.
Note that mib2c generates a lot of different coding styles, and based on what I see above I'm not quite convinced you chose the right style as it doesn't look like your data will be highly static and thus you'll need to set an alarm (see snmp_alarm(3)) to update the poolInOctets numbers on a regular basis.
I wish to send some information like authentication token inside SOAP header. I am using gSOAP/c/Linux. Please help me how to pass?
My SOAP_ENV__Header looks like
/* SOAP Header: */
struct SOAP_ENV__Header
{
struct ns3__Header *ns3__MyHeader; /* mustUnderstand */
};
and ns3__Header looks like
/* ns3:Header */
struct ns3__Header
{
char *Value; /* optional element of type xsd:string */
};
Sorry for bothering everybody. I figured it out. I did it like:
soap_init(&mysoap);
mysoap.header = (SOAP_ENV__Header *)soap_malloc(&mysoap, sizeof(SOAP_ENV__Header));
mysoap.header->ns3__MyHeader = (ns3__Header*)malloc(sizeof(ns3__Header));
mysoap.header->ns3__MyHeader->Value = (char*)malloc(10 * sizeof(char));
strcpy(mysoap.header->ns3__MyHeader->Value, str);
But I had to suppress the MustUnderstand attribute like the following:
SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Header(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Header *a, const char *type)
{
if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Header), type))
return soap->error;
//KNG
//soap->mustUnderstand = 1;
if (soap_out_PointerTons3__Header(soap, "ns3:MyHeader", -1, &a->ns3__MyHeader, ""))
return soap->error;
return soap_element_end_out(soap, tag);
}
I'm trying to build the example described at http://support.microsoft.com/kb/178749/EN-US/ in order to build an application that programatically accesses Excel using Automation. I have Visual C++ 2005/Visual Studio 2005. Some of the instructions don't exactly match up (classwizard, mostly), but the general idea seems to be the same.
Problems: I don't end up with an excel.h file after using the "new class" to create my wrapper classes. So I can' t #include that file as it specifies in step 13. I do get a excel.tlh and an excel.tli in my windebug directory, but that doesn't seem to work. I tried all orders for
#include "stdafx.h"
#include "debug/excel.tli"
#include "debug/excel.tlh"
... including leaving one of those files out of the compile, but I still end up with a ton of compile errors.
Here's the top 5 compile errors with the above #includes:
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C2653: 'Adjustments' : is not a class or namespace name
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C2146: syntax error : missing ';' before identifier 'GetParent'
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C2433: 'IDispatchPtr' : 'inline' not permitted on data declarations
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(16) : error C3861: 'get_Parent': identifier not found
Here's the top 5 errors with these includes:
#include "stdafx.h"
#include "debug/excel.tlh"
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tlh(550) : error C3121: cannot change GUID for class 'IFilter'
1> c:\program files\microsoft sdks\windows\v6.0\include\comdef.h(483) : see declaration of 'IFilter'
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tlh(1541) : error C2786: 'BOOL (__stdcall *)(HDC,int,int,int,int)' : invalid operand for __uuidof
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tlh(1541) : error C2923: '_com_IIID' : 'Rectangle' is not a valid template type argument for parameter '_Interface'
1> c:\program files\microsoft sdks\windows\v6.0\include\wingdi.h(3667) : see declaration of 'Rectangle'
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tlh(1541) : error C3203: '_com_IIID' : unspecialized class template can't be used as a template argument for template parameter '_IIID', expected a real type
Here's the top 5 errors with these includes:
#include "stdafx.h"
#include "debug/excel.tli"
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C2653: 'Adjustments' : is not a class or namespace name
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C2146: syntax error : missing ';' before identifier 'GetParent'
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C2433: 'IDispatchPtr' : 'inline' not permitted on data declarations
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\excel.tli(14) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Thanks in advance.
I'm not familiar with the ClassWizard wrapper generator, but it looks like it may have #imported the Excel COM type library without a namespace, and you're getting conflicts with the SDK header files. Check the .tlh file and ensure there's a namespace around the definitions. If not, I'd look at importing it the more manual (but safer) way using #import.
Check out using #import directly; it will generate the .tlh and .tli files in the build directory, which you can then use directory with CComPtr<> and the like. I've found that to be much more straightforward than using CW wrapper classes. That's my advice anyway.
I don't know if this helps but generally you #import the type library but you do NOT #include the .tli and .tlh files (the #import implicitly does this).
Also, remember there are two ways of calling a COM server in MFC.
Use #import which basically creates smart ATL pointers to create COM objects and call methods.
Use the class wizard to create an IDispatch style class wrapper to create COM object and call the methods.
At Nick's request, I'm posting the build error output and following that the vbe6ext.tlh file, up to the error:
********************* Build output:
1>------ Build started: Project: testole, Configuration: Debug Win32 ------
1>Compiling...
1>testoleDlg.cpp
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\vbe6ext.tlh(463) : error C2061: syntax error : identifier '__missing_type__'
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\testoledlg.cpp(164) : error C2065: '_Application' : undeclared identifier
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\testoledlg.cpp(164) : error C2146: syntax error : missing ';' before identifier 'app'
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\testoledlg.cpp(164) : error C2065: 'app' : undeclared identifier
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\testoledlg.cpp(166) : error C2228: left of '.CreateDispatch' must have class/struct/union
1> type is ''unknown-type''
1>c:\users\sniles\documents\visual studio 2005\source10\testole\testole\testoledlg.cpp(172) : error C2228: left of '.SetVisible' must have class/struct/union
1> type is ''unknown-type''
1>Build log was saved at "file://c:\Users\sniles\Documents\Visual Studio 2005\Source10\testole\testole\Debug\BuildLog.htm"
1>testole - 6 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
******************* vbe6ext.tlh
// Created by Microsoft (R) C/C++ Compiler Version 14.00.50727.42 (e112bc16).
//
// c:\users\sniles\documents\visual studio 2005\source10\testole\testole\debug\vbe6ext.tlh
//
// C++ source equivalent of Win32 type library C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6EXT.OLB
// compiler-generated file created 10/10/08 at 14:03:16 - DO NOT EDIT!
#pragma once
#pragma pack(push, 8)
#include <comdef.h>
namespace VBIDE {
//
// Forward references and typedefs
//
struct __declspec(uuid("0002e157-0000-0000-c000-000000000046"))
/* LIBID */ __VBIDE;
struct __declspec(uuid("0002e158-0000-0000-c000-000000000046"))
/* dual interface */ Application;
enum vbextFileTypes;
struct __declspec(uuid("0002e166-0000-0000-c000-000000000046"))
/* dual interface */ testVBE;
enum vbext_WindowType;
enum vbext_WindowState;
struct __declspec(uuid("0002e16b-0000-0000-c000-000000000046"))
/* dual interface */ Window;
struct __declspec(uuid("0002e16a-0000-0000-c000-000000000046"))
/* dual interface */ _Windows_old;
struct __declspec(uuid("f57b7ed0-d8ab-11d1-85df-00c04f98f42c"))
/* dual interface */ _Windows;
struct /* coclass */ Windows;
struct __declspec(uuid("0002e16c-0000-0000-c000-000000000046"))
/* dual interface */ _LinkedWindows;
struct /* coclass */ LinkedWindows;
struct __declspec(uuid("0002e167-0000-0000-c000-000000000046"))
/* dual interface */ Events;
struct __declspec(uuid("0002e113-0000-0000-c000-000000000046"))
/* interface */ _VBProjectsEvents;
struct __declspec(uuid("0002e103-0000-0000-c000-000000000046"))
/* dispinterface */ _dispVBProjectsEvents;
struct __declspec(uuid("0002e115-0000-0000-c000-000000000046"))
/* interface */ _VBComponentsEvents;
struct __declspec(uuid("0002e116-0000-0000-c000-000000000046"))
/* dispinterface */ _dispVBComponentsEvents;
struct __declspec(uuid("0002e11a-0000-0000-c000-000000000046"))
/* interface */ _ReferencesEvents;
struct __declspec(uuid("0002e118-0000-0000-c000-000000000046"))
/* dispinterface */ _dispReferencesEvents;
struct /* coclass */ ReferencesEvents;
struct __declspec(uuid("0002e130-0000-0000-c000-000000000046"))
/* interface */ _CommandBarControlEvents;
struct __declspec(uuid("0002e131-0000-0000-c000-000000000046"))
/* dispinterface */ _dispCommandBarControlEvents;
struct /* coclass */ CommandBarEvents;
struct __declspec(uuid("0002e159-0000-0000-c000-000000000046"))
/* dual interface */ _ProjectTemplate;
struct /* coclass */ ProjectTemplate;
enum vbext_ProjectType;
enum vbext_ProjectProtection;
enum vbext_VBAMode;
struct __declspec(uuid("0002e160-0000-0000-c000-000000000046"))
/* dual interface */ _VBProject_Old;
struct __declspec(uuid("eee00915-e393-11d1-bb03-00c04fb6c4a6"))
/* dual interface */ _VBProject;
struct /* coclass */ VBProject;
struct __declspec(uuid("0002e165-0000-0000-c000-000000000046"))
/* dual interface */ _VBProjects_Old;
struct __declspec(uuid("eee00919-e393-11d1-bb03-00c04fb6c4a6"))
/* dual interface */ _VBProjects;
struct /* coclass */ VBProjects;
struct __declspec(uuid("be39f3d4-1b13-11d0-887f-00a0c90f2744"))
/* dual interface */ SelectedComponents;
enum vbext_ComponentType;
struct __declspec(uuid("0002e161-0000-0000-c000-000000000046"))
/* dual interface */ _Components;
struct /* coclass */ Components;
struct __declspec(uuid("0002e162-0000-0000-c000-000000000046"))
/* dual interface */ _VBComponents_Old;
struct __declspec(uuid("eee0091c-e393-11d1-bb03-00c04fb6c4a6"))
/* dual interface */ _VBComponents;
struct /* coclass */ VBComponents;
struct __declspec(uuid("0002e163-0000-0000-c000-000000000046"))
/* dual interface */ _Component;
struct /* coclass */ Component;
struct __declspec(uuid("0002e164-0000-0000-c000-000000000046"))
/* dual interface */ _VBComponent_Old;
struct __declspec(uuid("eee00921-e393-11d1-bb03-00c04fb6c4a6"))
/* dual interface */ _VBComponent;
struct /* coclass */ VBComponent;
struct __declspec(uuid("0002e18c-0000-0000-c000-000000000046"))
/* dual interface */ Property;
struct __declspec(uuid("0002e188-0000-0000-c000-000000000046"))
/* dual interface */ _Properties;
struct /* coclass */ Properties;
struct __declspec(uuid("da936b62-ac8b-11d1-b6e5-00a0c90f2744"))
/* dual interface */ _AddIns;
struct /* coclass */ Addins;
struct __declspec(uuid("da936b64-ac8b-11d1-b6e5-00a0c90f2744"))
/* dual interface */ AddIn;
enum vbext_ProcKind;
struct __declspec(uuid("0002e16e-0000-0000-c000-000000000046"))
/* dual interface */ _CodeModule;
struct /* coclass */ CodeModule;
struct __declspec(uuid("0002e172-0000-0000-c000-000000000046"))
/* dual interface */ _CodePanes;
struct /* coclass */ CodePanes;
enum vbext_CodePaneview;
struct __declspec(uuid("0002e176-0000-0000-c000-000000000046"))
/* dual interface */ _CodePane;
struct /* coclass */ CodePane;
struct __declspec(uuid("0002e17a-0000-0000-c000-000000000046"))
/* dual interface */ _References;
enum vbext_RefKind;
struct __declspec(uuid("0002e17e-0000-0000-c000-000000000046"))
/* dual interface */ ignorethis;
struct __declspec(uuid("cdde3804-2064-11cf-867f-00aa005ff34a"))
/* dispinterface */ _dispReferences_Events;
struct /* coclass */ References;
//
// Smart pointer typedef declarations
//
_COM_SMARTPTR_TYPEDEF(Application, __uuidof(Application));
_COM_SMARTPTR_TYPEDEF(_VBProjectsEvents, __uuidof(_VBProjectsEvents));
_COM_SMARTPTR_TYPEDEF(_dispVBProjectsEvents, __uuidof(_dispVBProjectsEvents));
_COM_SMARTPTR_TYPEDEF(_VBComponentsEvents, __uuidof(_VBComponentsEvents));
_COM_SMARTPTR_TYPEDEF(_dispVBComponentsEvents, __uuidof(_dispVBComponentsEvents));
_COM_SMARTPTR_TYPEDEF(_ReferencesEvents, __uuidof(_ReferencesEvents));
_COM_SMARTPTR_TYPEDEF(_dispReferencesEvents, __uuidof(_dispReferencesEvents));
_COM_SMARTPTR_TYPEDEF(_CommandBarControlEvents, __uuidof(_CommandBarControlEvents));
_COM_SMARTPTR_TYPEDEF(_dispCommandBarControlEvents, __uuidof(_dispCommandBarControlEvents));
_COM_SMARTPTR_TYPEDEF(_ProjectTemplate, __uuidof(_ProjectTemplate));
_COM_SMARTPTR_TYPEDEF(Events, __uuidof(Events));
_COM_SMARTPTR_TYPEDEF(_Component, __uuidof(_Component));
_COM_SMARTPTR_TYPEDEF(SelectedComponents, __uuidof(SelectedComponents));
_COM_SMARTPTR_TYPEDEF(_dispReferences_Events, __uuidof(_dispReferences_Events));
_COM_SMARTPTR_TYPEDEF(testVBE, __uuidof(testVBE));
_COM_SMARTPTR_TYPEDEF(Window, __uuidof(Window));
_COM_SMARTPTR_TYPEDEF(_Windows_old, __uuidof(_Windows_old));
_COM_SMARTPTR_TYPEDEF(_LinkedWindows, __uuidof(_LinkedWindows));
_COM_SMARTPTR_TYPEDEF(_VBProject_Old, __uuidof(_VBProject_Old));
_COM_SMARTPTR_TYPEDEF(_VBProject, __uuidof(_VBProject));
_COM_SMARTPTR_TYPEDEF(_VBProjects_Old, __uuidof(_VBProjects_Old));
_COM_SMARTPTR_TYPEDEF(_VBProjects, __uuidof(_VBProjects));
_COM_SMARTPTR_TYPEDEF(_Components, __uuidof(_Components));
_COM_SMARTPTR_TYPEDEF(_VBComponents_Old, __uuidof(_VBComponents_Old));
_COM_SMARTPTR_TYPEDEF(_VBComponents, __uuidof(_VBComponents));
_COM_SMARTPTR_TYPEDEF(_VBComponent_Old, __uuidof(_VBComponent_Old));
_COM_SMARTPTR_TYPEDEF(_VBComponent, __uuidof(_VBComponent));
_COM_SMARTPTR_TYPEDEF(Property, __uuidof(Property));
_COM_SMARTPTR_TYPEDEF(_Properties, __uuidof(_Properties));
_COM_SMARTPTR_TYPEDEF(AddIn, __uuidof(AddIn));
_COM_SMARTPTR_TYPEDEF(_Windows, __uuidof(_Windows));
_COM_SMARTPTR_TYPEDEF(_AddIns, __uuidof(_AddIns));
_COM_SMARTPTR_TYPEDEF(_CodeModule, __uuidof(_CodeModule));
_COM_SMARTPTR_TYPEDEF(_CodePanes, __uuidof(_CodePanes));
_COM_SMARTPTR_TYPEDEF(_CodePane, __uuidof(_CodePane));
_COM_SMARTPTR_TYPEDEF(ignorethis, __uuidof(ignorethis));
_COM_SMARTPTR_TYPEDEF(_References, __uuidof(_References));
//
// Type library items
//
struct __declspec(uuid("0002e158-0000-0000-c000-000000000046"))
Application : IDispatch
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall get_Version (
/*[out,retval]*/ BSTR * lpbstrReturn ) = 0;
};
enum __declspec(uuid("06a03650-2369-11ce-bfdc-08002b2b8cda"))
vbextFileTypes
{
vbextFileTypeForm = 0,
vbextFileTypeModule = 1,
vbextFileTypeClass = 2,
vbextFileTypeProject = 3,
vbextFileTypeExe = 4,
vbextFileTypeFrx = 5,
vbextFileTypeRes = 6,
vbextFileTypeUserControl = 7,
vbextFileTypePropertyPage = 8,
vbextFileTypeDocObject = 9,
vbextFileTypeBinary = 10,
vbextFileTypeGroupProject = 11,
vbextFileTypeDesigners = 12
};
enum __declspec(uuid("be39f3db-1b13-11d0-887f-00a0c90f2744"))
vbext_WindowType
{
vbext_wt_CodeWindow = 0,
vbext_wt_Designer = 1,
vbext_wt_Browser = 2,
vbext_wt_Watch = 3,
vbext_wt_Locals = 4,
vbext_wt_Immediate = 5,
vbext_wt_ProjectWindow = 6,
vbext_wt_PropertyWindow = 7,
vbext_wt_Find = 8,
vbext_wt_FindReplace = 9,
vbext_wt_Toolbox = 10,
vbext_wt_LinkedWindowFrame = 11,
vbext_wt_MainWindow = 12,
vbext_wt_ToolWindow = 15
};
enum __declspec(uuid("be39f3dc-1b13-11d0-887f-00a0c90f2744"))
vbext_WindowState
{
vbext_ws_Normal = 0,
vbext_ws_Minimize = 1,
vbext_ws_Maximize = 2
};
struct __declspec(uuid("0002e185-0000-0000-c000-000000000046"))
Windows;
// [ default ] interface _Windows
struct __declspec(uuid("0002e187-0000-0000-c000-000000000046"))
LinkedWindows;
// [ default ] interface _LinkedWindows
struct __declspec(uuid("0002e113-0000-0000-c000-000000000046"))
_VBProjectsEvents : IUnknown
{};
struct __declspec(uuid("0002e103-0000-0000-c000-000000000046"))
_dispVBProjectsEvents : IDispatch
{};
struct __declspec(uuid("0002e115-0000-0000-c000-000000000046"))
_VBComponentsEvents : IUnknown
{};
struct __declspec(uuid("0002e116-0000-0000-c000-000000000046"))
_dispVBComponentsEvents : IDispatch
{};
struct __declspec(uuid("0002e11a-0000-0000-c000-000000000046"))
_ReferencesEvents : IUnknown
{};
struct __declspec(uuid("0002e118-0000-0000-c000-000000000046"))
_dispReferencesEvents : IDispatch
{};
struct __declspec(uuid("0002e119-0000-0000-c000-000000000046"))
ReferencesEvents;
// [ default ] interface _ReferencesEvents
// [ default, source ] dispinterface _dispReferencesEvents
struct __declspec(uuid("0002e130-0000-0000-c000-000000000046"))
_CommandBarControlEvents : IUnknown
{};
struct __declspec(uuid("0002e131-0000-0000-c000-000000000046"))
_dispCommandBarControlEvents : IDispatch
{};
struct __declspec(uuid("0002e132-0000-0000-c000-000000000046"))
CommandBarEvents;
// [ default ] interface _CommandBarControlEvents
// [ default, source ] dispinterface _dispCommandBarControlEvents
struct __declspec(uuid("0002e159-0000-0000-c000-000000000046"))
_ProjectTemplate : IDispatch
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall get_Application (
/*[out,retval]*/ struct Application * * lppaReturn ) = 0;
virtual HRESULT __stdcall get_Parent (
/*[out,retval]*/ struct Application * * lppaReturn ) = 0;
};
struct __declspec(uuid("32cdf9e0-1602-11ce-bfdc-08002b2b8cda"))
ProjectTemplate;
// [ default ] interface _ProjectTemplate
enum __declspec(uuid("ffcf3247-debf-11d1-baff-00c04fb6c4a6"))
vbext_ProjectType
{
vbext_pt_HostProject = 100,
vbext_pt_StandAlone = 101
};
enum __declspec(uuid("0002e129-0000-0000-c000-000000000046"))
vbext_ProjectProtection
{
vbext_pp_none = 0,
vbext_pp_locked = 1
};
enum __declspec(uuid("be39f3d2-1b13-11d0-887f-00a0c90f2744"))
vbext_VBAMode
{
vbext_vm_Run = 0,
vbext_vm_Break = 1,
vbext_vm_Design = 2
};
struct __declspec(uuid("0002e169-0000-0000-c000-000000000046"))
VBProject;
// [ default ] interface _VBProject
struct __declspec(uuid("0002e167-0000-0000-c000-000000000046"))
Events : IDispatch
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall get_ReferencesEvents (
/*[in]*/ struct _VBProject * VBProject,
/*[out,retval]*/ struct _ReferencesEvents * * prceNew ) = 0;
virtual HRESULT __stdcall get_CommandBarEvents (
/*[in]*/ IDispatch * CommandBarControl,
/*[out,retval]*/ struct _CommandBarControlEvents * * prceNew ) = 0;
};
struct __declspec(uuid("0002e101-0000-0000-c000-000000000046"))
VBProjects;
// [ default ] interface _VBProjects
enum __declspec(uuid("be39f3d5-1b13-11d0-887f-00a0c90f2744"))
vbext_ComponentType
{
vbext_ct_StdModule = 1,
vbext_ct_ClassModule = 2,
vbext_ct_MSForm = 3,
vbext_ct_ActiveXDesigner = 11,
vbext_ct_Document = 100
};
struct __declspec(uuid("be39f3d6-1b13-11d0-887f-00a0c90f2744"))
Components;
// [ default ] interface _Components
struct __declspec(uuid("be39f3d7-1b13-11d0-887f-00a0c90f2744"))
VBComponents;
// [ default ] interface _VBComponents
struct __declspec(uuid("0002e163-0000-0000-c000-000000000046"))
_Component : IDispatch
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall get_Application (
/*[out,retval]*/ struct Application * * lppaReturn ) = 0;
virtual HRESULT __stdcall get_Parent (
/*[out,retval]*/ struct _Components * * lppcReturn ) = 0;
virtual HRESULT __stdcall get_IsDirty (
/*[out,retval]*/ VARIANT_BOOL * lpfReturn ) = 0;
virtual HRESULT __stdcall put_IsDirty (
/*[in]*/ VARIANT_BOOL lpfReturn ) = 0;
virtual HRESULT __stdcall get_Name (
/*[out,retval]*/ BSTR * pbstrReturn ) = 0;
virtual HRESULT __stdcall put_Name (
/*[in]*/ BSTR pbstrReturn ) = 0;
};
struct __declspec(uuid("be39f3d8-1b13-11d0-887f-00a0c90f2744"))
Component;
// [ default ] interface _Component
struct __declspec(uuid("be39f3d4-1b13-11d0-887f-00a0c90f2744"))
SelectedComponents : IDispatch
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall Item (
/*[in]*/ int index,
/*[out,retval]*/ struct _Component * * lppcReturn ) = 0;
virtual HRESULT __stdcall get_Application (
/*[out,retval]*/ struct Application * * lppaReturn ) = 0;
virtual HRESULT __stdcall get_Parent (
/*[out,retval]*/ struct _VBProject * * lppptReturn ) = 0;
virtual HRESULT __stdcall get_Count (
/*[out,retval]*/ long * lplReturn ) = 0;
virtual HRESULT __stdcall _NewEnum (
/*[out,retval]*/ IUnknown * * lppiuReturn ) = 0;
};
struct __declspec(uuid("be39f3da-1b13-11d0-887f-00a0c90f2744"))
VBComponent;
// [ default ] interface _VBComponent
struct __declspec(uuid("0002e18b-0000-0000-c000-000000000046"))
Properties;
// [ default ] interface _Properties
struct __declspec(uuid("da936b63-ac8b-11d1-b6e5-00a0c90f2744"))
Addins;
// [ default ] interface _AddIns
enum vbext_ProcKind
{
vbext_pk_Proc = 0,
vbext_pk_Let = 1,
vbext_pk_Set = 2,
vbext_pk_Get = 3
};
struct __declspec(uuid("0002e170-0000-0000-c000-000000000046"))
CodeModule;
// [ default ] interface _CodeModule
struct __declspec(uuid("0002e174-0000-0000-c000-000000000046"))
CodePanes;
// [ default ] interface _CodePanes
enum vbext_CodePaneview
{
vbext_cv_ProcedureView = 0,
vbext_cv_FullModuleView = 1
};
struct __declspec(uuid("0002e178-0000-0000-c000-000000000046"))
CodePane;
// [ default ] interface _CodePane
enum vbext_RefKind
{
vbext_rk_TypeLib = 0,
vbext_rk_Project = 1
};
struct __declspec(uuid("cdde3804-2064-11cf-867f-00aa005ff34a"))
_dispReferences_Events : IDispatch
{};
struct __declspec(uuid("0002e17c-0000-0000-c000-000000000046"))
References;
// [ default ] interface _References
// [ default, source ] dispinterface _dispReferences_Events
struct __declspec(uuid("0002e166-0000-0000-c000-000000000046"))
testVBE : Application
{
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall get_VBProjects (
/*[out,retval]*/ struct _VBProjects * * lppptReturn ) = 0;
virtual HRESULT __stdcall get_CommandBars (
/*[out,retval]*/ __missing_type__ * * ppcbs ) = 0;