Discussion:
I need a dll
(too old to reply)
T
2022-11-25 02:50:22 UTC
Permalink
Hi All,

I realize I am asking for someone to do
my homework for me here, but please suffer me.

I program in Raku. I can barely guess at C++.
Raku have failed me here (there own admission).

Would someone please show me how to write
the following C++ DLL?

I can provide a pointer (*p) [in] and the length of
the data (length) [in].

Generically speaking, I would like back the
array of bytes (CArray?) [out] that the pointer
points to.

Something like

CArray ReturnCArray(
[in] Pointer *p,
[in] DWORD length
)

or

ReturnCArray(
[in] Pointer *p,
[in] DWORD length,
[out] CArray ArrayOfBytes
)

And I would also appreciate the gcc command to
compile this. Will the compiler create a .h
file at compile same time?

Many thanks,
-T
T
2022-11-26 04:32:53 UTC
Permalink
Post by T
Hi All,
I realize I am asking for someone to do
my homework for me here, but please suffer me.
I program in Raku.  I can barely guess at C++.
Raku have failed me here (there own admission).
Would someone please show me how to write
the following C++ DLL?
I can provide a pointer (*p) [in] and the length of
the data (length) [in].
Generically speaking, I would like back the
array of bytes (CArray?) [out] that the pointer
points to.
Something like
CArray ReturnCArray(
  [in] Pointer *p,
  [in] DWORD   length
)
or
ReturnCArray(
  [in]  Pointer *p,
  [in]  DWORD   length,
  [out] CArray  ArrayOfBytes
)
And I would also appreciate the gcc command to
compile this.  Will the compiler create a .h
file at compile same time?
Many thanks,
-T
I might not need this if I can ever find
the documentation to string.h memcpy on
learn.microsoft.com
R.Wieser
2022-11-26 06:38:56 UTC
Permalink
T
I might not need this if I can ever find the documentation to string.h
memcpy on
learn.microsoft.com
https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/dswaw1wk(v=vs.100)

?

Used search term : site:learn.microsoft.com memcpy

Regards,
Rudy Wieser
T
2022-11-26 08:23:31 UTC
Permalink
Post by R.Wieser
T
I might not need this if I can ever find the documentation to string.h
memcpy on
learn.microsoft.com
https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/dswaw1wk(v=vs.100)
?
Used search term : site:learn.microsoft.com memcpy
Regards,
Rudy Wieser
I went to learn.Microsoft.com and used their search.
Found it about a minute ago
T
2022-11-26 08:27:57 UTC
Permalink
Post by R.Wieser
T
I might not need this if I can ever find the documentation to string.h
memcpy on
learn.microsoft.com
https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/dswaw1wk(v=vs.100)
?
Used search term : site:learn.microsoft.com memcpy
Regards,
Rudy Wieser
I should probably ue;
T
2022-11-26 08:29:00 UTC
Permalink
Post by R.Wieser
T
I might not need this if I can ever find the documentation to string.h
memcpy on
learn.microsoft.com
https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/dswaw1wk(v=vs.100)
?
Used search term : site:learn.microsoft.com memcpy
Regards,
Rudy Wieser
I should probably use

https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/memcpy-s-wmemcpy-s?view=msvc-170

instead.

Any idea what DLL that is coming from?

-T
R.Wieser
2022-11-26 12:00:19 UTC
Permalink
T,
Post by T
Any idea what DLL that is coming from?
Yep. its CRTDLL.DLL.

By the way, there are programs around that wll show you the list of
functions in a DLL. one(?) is mentioned here :

https://stackoverflow.com/questions/11657968/how-to-get-list-of-functions-inside-a-dll-managed-and-unmanaged

Regards,
Rudy Wieser
T
2022-11-26 23:41:03 UTC
Permalink
Post by R.Wieser
T,
Post by T
Any idea what DLL that is coming from?
Yep. its CRTDLL.DLL.
where CRTDLL.DLL
INFO: Could not find files for the given pattern(s).
Post by R.Wieser
By the way, there are programs around that wll show you the list of
https://stackoverflow.com/questions/11657968/how-to-get-list-of-functions-inside-a-dll-managed-and-unmanaged
Could not find the program you were referring to.
R.Wieser
2022-11-27 07:30:07 UTC
Permalink
T,
Post by T
Post by R.Wieser
https://stackoverflow.com/questions/11657968/how-to-get-list-of-functions-inside-a-dll-managed-and-unmanaged
Could not find the program you were referring to.
The name of it (on that webpage), or when you googled for it (to download
it) ?

The name is "dumpbin.exe".

You can ofcourse also look for similar, perhaps not MS producs. :-) The
one that came with my Assembler (Tasm32) is called TDump.exe.

Regards,
Rudy Wieser
Post by T
Post by R.Wieser
T,
Post by T
Any idea what DLL that is coming from?
Yep. its CRTDLL.DLL.
where CRTDLL.DLL
INFO: Could not find files for the given pattern(s).
Post by R.Wieser
By the way, there are programs around that wll show you the list of
https://stackoverflow.com/questions/11657968/how-to-get-list-of-functions-inside-a-dll-managed-and-unmanaged
Could not find the program you were referring to.
T
2022-11-26 08:22:06 UTC
Permalink
Post by T
Post by T
Hi All,
I realize I am asking for someone to do
my homework for me here, but please suffer me.
I program in Raku.  I can barely guess at C++.
Raku have failed me here (there own admission).
Would someone please show me how to write
the following C++ DLL?
I can provide a pointer (*p) [in] and the length of
the data (length) [in].
Generically speaking, I would like back the
array of bytes (CArray?) [out] that the pointer
points to.
Something like
CArray ReturnCArray(
   [in] Pointer *p,
   [in] DWORD   length
)
or
ReturnCArray(
   [in]  Pointer *p,
   [in]  DWORD   length,
   [out] CArray  ArrayOfBytes
)
And I would also appreciate the gcc command to
compile this.  Will the compiler create a .h
file at compile same time?
Many thanks,
-T
I might not need this if I can ever find
the documentation to string.h memcpy on
learn.microsoft.com
Cancel the request. I finally found memcpy:

https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/memcpy-wmemcpy?vie
Loading...