Hello
I am interfacing a C++ program with a VB program and I am trying to
determine how to properly define the collection in my c++ program. I
am using the import function to import the functions of the dll that I
am interfacing with and when I look at the tli file that is created
during the compile I see the following
inline _IMSUsersPtr _cIMSBch::GetIMSUsers ( VARIANT_BOOL UserGroups )
{
struct _IMSUsers * _result = 0;
HRESULT _hr = raw_GetIMSUsers(UserGroups, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _IMSUsersPtr(_result, false);
_cIMSBchPtr ptrIMSBch(__uuidof(cIMSBch));
ptrIMSBch->GetIMSUsers(FALSE);
I do above statement and it compiles but at this point it does not
have a problem because I don't have a datatype setup to return the
collection into
What I want is something like the following
usercollection = ptrIMSBch->GetIMSUsers(FALSE);
but I don't know how to define usercollection - From what I can tell
the return value definition is a
struct _IMSUsers * <---Does this mean that C++ sees the collection
as a ptr to a structure?
I have tried different things but have not come up with a solution
one of which was
_IMSUsersPtr ptrIMSUsersPtr(__uuidof(IMSUsers));
ptrIMSUsersPtr = ptrIMSBch->GetIMSUsers(FALSE);
This compiles but goes off into lala land when it runs
struct usercollection *collectuser
collectuser = ptrIMSBch->GetIMSUsers(FALSE); - does not compile
(ptrIMSUsersPtr)collectuser = ptrIMSBch->GetIMSUsers(FALSE); - does
not compile
Can someone help? I am a little confussed.
Ultimately we are going to have a function that returns a couple non
related data types as well as a collection. However the collection
will never be used in my interface but the dll I am interfacing with
requires the collection as something that needs to be returned because
other future interfaces might require the use of the collection. This
seems strange for me to ask to define something that is not used
directly but nonetheless it happens to be the case so given that I
need to do make sure that the collection is defined properly so that
it compiles and that can hold the returned data.
Any ideas?
Thanks
Jake 13 1537
On Wed, 07 Feb 2007 14:59:46 -0800, Jake wrote:
Hello
I am interfacing a C++ program with a VB program
[...]
I think you might rather try asking in a VB forum, as it appears that the
information you require is highly VB-specific; this newsgroup deals only
with C++ *language* issues.
Good luck,
--
Lionel B
* Jake:
>
I am interfacing a C++ program with a VB program and I am trying to
determine how to properly define the collection in my c++ program.
[snip]
struct _IMSUsers * <---Does this mean that C++ sees the collection
as a ptr to a structure?
When you're struggling with basic C syntax you should not be attempting
to interface C++ with other languages.
No doubt you'll get it to "work" and it will be full of bugs.
Forget it.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
On Feb 7, 6:46 pm, "Alf P. Steinbach" <a...@start.nowrote:
* Jake:
I am interfacing a C++ program with a VB program and I am trying to
determine how to properly define the collection in my c++ program.
[snip]
struct _IMSUsers * <---Does this mean that C++ sees the collection
as a ptr to a structure?
When you're struggling with basic C syntax you should not be attempting
to interface C++ with other languages.
No doubt you'll get it to "work" and it will be full of bugs.
Forget it.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
I'm not sure why you wasted your time posting if you didn't have any
real insight into the issue. Maybe your just trying to feel superior
for whatever reason (tiny penis) but really all I wanted was some
help. After all that is the reason these groups exist. Your attempt
to insult me while I am trying to ask for help only makes you come off
like a jerk.
* Jake:
>
I'm not sure why you wasted your time posting if you didn't have any
real insight into the issue. Maybe your just trying to feel superior
for whatever reason (tiny penis) but really all I wanted was some
help. After all that is the reason these groups exist. Your attempt
to insult me while I am trying to ask for help only makes you come off
like a jerk.
Please don't quote signatures, don't post off-topic questions, don't
post infantile dribble to the group, and in general, read the FAQ before
posting. You got good advice in spite of that. Now please disappear.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
On Thu, 08 Feb 2007 08:37:18 +0100, Alf P. Steinbach wrote:
* Jake:
>> I'm not sure why you wasted your time posting if you didn't have any real insight into the issue. Maybe your just trying to feel superior for whatever reason (tiny penis) but really all I wanted was some help. After all that is the reason these groups exist. Your attempt to insult me while I am trying to ask for help only makes you come off like a jerk.
Please don't quote signatures, don't post off-topic questions, don't
post infantile dribble to the group, and in general, read the FAQ before
posting. You got good advice in spite of that. Now please disappear.
Now, now children. To the OP: yes, you committed multiple heinous crimes
against Usenet etiquette (see above).
To Alf P.: that was to my mind unnecessarily snippy. In particular:
Alf P. Steinbach wrote:
When you're struggling with basic C syntax you should not be attempting
to interface C++ with other languages.
Perhaps you have never been in the situation where your job *forces* you
to engage with some technology that you are unfamiliar with. Not good,
but perhaps the OP has no option.
No doubt you'll get it to "work" and it will be full of bugs.
Maybe, but that's unhelpful.
Forget it.
Tell that to his boss.
--
Lionel B
Jake wrote:
I am interfacing a C++ program with a VB program and I am trying to
determine how to properly define the collection in my c++ program. I
am using the import function to import the functions of the dll that I
am interfacing with and when I look at the tli file that is created
during the compile I see the following
inline _IMSUsersPtr _cIMSBch::GetIMSUsers ( VARIANT_BOOL UserGroups )
{
struct _IMSUsers * _result = 0;
HRESULT _hr = raw_GetIMSUsers(UserGroups, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _IMSUsersPtr(_result, false);
The return value seems to be a class and not a raw pointer. That might be
the reason why your attempts did not work.
Since we can hardly guess what you are doing without actual source code and
class declarations, it would really be better if you ask this in a
Microsoft or VB specific newsgroup, as the other posters suggested.
--
Thomas http://www.netmeister.org/news/learn2quote.html
Jake wrote:
I'm not sure why you wasted your time posting if you didn't have any
real insight into the issue.
*plonk*
Brian
On Feb 8, 2:55 pm, "Default User" <defaultuse...@yahoo.comwrote:
Jake wrote:
I'm not sure why you wasted your time posting if you didn't have any
real insight into the issue.
*plonk*
Brian
plonk your mom ass
Jake wrote:
>
plonk your mom ass
Is that English, or some odd language I haven't seen before?
--
Ian Collins.
On Feb 8, 3:44 pm, Ian Collins <ian-n...@hotmail.comwrote:
Jake wrote:
plonk your mom ass
Is that English, or some odd language I haven't seen before?
--
Ian Collins.
Ask the the dickhead Brian he uses it a lot maybe he will tell you
once he gets his head out of his ass He like Alf think they are
somehow superior to the rest of us but instead they do nothing but
whack off to their dad's gay porn collection all day.
Jake wrote:
On Feb 8, 3:44 pm, Ian Collins <ian-n...@hotmail.comwrote:
>>Jake wrote:
>>>plonk your mom ass
Is that English, or some odd language I haven't seen before?
Ask the the dickhead Brian he uses it a lot maybe he will tell you
once he gets his head out of his ass
Lets have a go at parsing your post.
to plonk - put someone in one's killfile.
mom - Americanism for mother
ass - either a wild donkey or the Americanism for arse.
So we have
"Put your mother donkey/arse in my kill file"
--
Ian Collins.
On Feb 8, 3:56 pm, Ian Collins <ian-n...@hotmail.comwrote:
Jake wrote:
On Feb 8, 3:44 pm, Ian Collins <ian-n...@hotmail.comwrote:
>Jake wrote:
>>plonk your mom ass
>Is that English, or some odd language I haven't seen before?
Ask the the dickhead Brian he uses it a lot maybe he will tell you
once he gets his head out of his ass
Lets have a go at parsing your post.
to plonk - put someone in one's killfile.
mom - Americanism for mother
ass - either a wild donkey or the Americanism for arse.
So we have
"Put your mother donkey/arse in my kill file"
--
Ian Collins.
Whatever floats your boat
Jake wrote:
On Feb 8, 3:56 pm, Ian Collins <ian-n...@hotmail.comwrote:
>>Jake wrote:
>>>On Feb 8, 3:44 pm, Ian Collins <ian-n...@hotmail.comwrote:
>>>>Jake wrote:
>>>>>plonk your mom ass
>>>>Is that English, or some odd language I haven't seen before?
>>>Ask the the dickhead Brian he uses it a lot maybe he will tell you once he gets his head out of his ass
Lets have a go at parsing your post.
to plonk - put someone in one's killfile. mom - Americanism for mother ass - either a wild donkey or the Americanism for arse.
So we have
"Put your mother donkey/arse in my kill file"
Please don't quote signatures.
>
Whatever floats your boat
Water?
--
Ian Collins. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: njp |
last post by:
BlankHi,
How do I create a tightly coupled Object 1 such that when I update it in one collection, it is simultaneously and automatically updated in other collections? The collections are defined...
|
by: Tim T. |
last post by:
I'm currently working on a report to forecast production for finished goods.
The user can select one or more items to forecast. In addition, they may
select one or more warehouses to view...
|
by: Simon |
last post by:
Hi all,
I am writing a windows application using vb.net on the 1.1 framework.
We have in the application, some strongly typed collections that have been
written as classes that do not inherit...
|
by: nhmark64 |
last post by:
Hi,
Does System.Collections.Generic.Queue not have a Synchronized
method because it is already in effect synchronized, or is the
Synchronized functionality missing from...
|
by: Adam Clauss |
last post by:
I ran into a problem a while back when attempting to convert existing .NET
1.1 based code to .NET 2.0 using Generic collections rather than Hashtable,
ArrayList, etc.
I ran into an issue because...
|
by: WebSnozz |
last post by:
Some collections are such that efficient search algorithms work on them
such as binary search if the collection is a type which is sorted.
I'm wondering how LINQ searches these collections and if...
|
by: Fred Heida |
last post by:
Hi,
i'm trying to (using managed C++) implment the IEnumerable<Tinterface on
my class..
but have a problem with the 2 GetEnumerator method required.... what i have
done is...
...
|
by: Sid Price |
last post by:
Hello,
I have a class of objects (Device) that are managed by another object
(Devices) with a collection class (DeviceCollection) inherited from
Collections.Hashtable. Each of the Device objects...
|
by: Michi Henning |
last post by:
I can pass a generic collection as ICollection<Tjust fine:
static void flatCollection(ICollection<intc) {}
// ...
List<intl = new List<int>();
flatCollection(l); // Works fine
Now I...
|
by: Marco Shaw |
last post by:
I've got some C# code to create a custom PowerShell cmdlet with these
statements:
....
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
....
...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
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...
|
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...
| |