- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Again, when looking for code to crib to write multithreading code, I found this and used it to start a thread:
Code:
hThread1 = CreateThread (NULL_SECURITY_ATTRIBUTES, 0, & LOC(ThreadProc), & LOC(pColor1), 0, & LOC(ThreadID1))
However, when I tried to compile it, the compiler objected to the 'LOC's saying it was the wrong type of object. By trial and error, I had to change the code to
Code:
hThread1 = CreateThread (NULL, 0, & ThrdProc, & Dummy, 0, & ThreadID1)
before it would compile correctly. Why is this? I am using CVF 6.6C.
This problem indicates that there will be a lot ofsample codes that willsimilarly fail, IMO.
- Etiquetas:
- Intel® Fortran Compiler
Enlace copiado
1 Responder
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
There are two declarations of CreateThread in CVF -- one in KERNEL32 and one in DFMT. Your first call conforms to the former, and the second to the latter. Personally, I consider DFMT "obsolescent" -- the one in Kernel32 is more consistent withother APIs.
(There's also ALLOW_NULL for lpThreadAttributes in Kernel32 version, so you may pass plain NULL() instead of NULL_SECURITY_ATTRIBUTES).
Jugoslav

Responder
Opciones de temas
- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla