K
Karl E. Peterson
krazymike said:Thanks. That's a lot of help. You know it's people like you who make
it nearly impossible to get any help. Trying to make people look bad
and yourself good only serves to expose you as the jerk you clearly
are.
Bite me. I've been here far too long to care how I look to random newbs. And,
fwiw, it's almost certain that a majority of regulars here would agree it's people
like you who make it nearly impossible for, well, people like you to get any help
here. If you can't describe the problem, give it up.
"Doesn't work" = hSearch gets value of -1 no matter what I do.
What's Err.LastDllError report?
Prepending the \\?\ doesn't change anything.
There are *fundamental* differences in calling A/W functions from VB. As I stated,
you need to have a grasp on how pointers are passed to external libraries.
What I was told that my
code that works with the FindFirstFileA/FindNextFileA would work by
switching to the W implementation of these functions. I'm finding
that this is not the case.
Wrong. That is the case. But it's like switching to diesel to improve your milage.
There's "a bit more to it" than just that.
I read somewhere that you need to pass the parameters to the W
implementations as UTF-16 strings, but I have yet to have any luck
with that either. The UTF-16 converter I found was returning null
strings. I tried using MultiByteToWideChar to generate a UTF-8, but I
don't think that's really doing much. The handler still receives the
-1 value.
VB stores all strings as Unicode internally. How you pass them to external
libraries will determine what they recieve. That's *why* I asked you how you were
doing that. In particular, for your declares (function and structure) and the
actual call. If you can't provide those, we're just pounding sand here. <-- last
time I'm nice about that.
I know this has to be possible, but perhaps not from VBA?
Of course it is.
If I can get this working in vb6, that'd do fine, too.
From this perspective, they are functionally identical languages.
I'm just restricted
from using .Net in my department. Not my choice, just the way
"business" decisions are made sometimes.
It's a good decision. Trust me.
Btw, I'm curious why you entirely ignored my initial suggestion. Given your
description of the actual problem, it still seems to me like you're working far
harder than needed to find a solution to a problem you don't really have.